Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #'queue.declare_ok'{queue = ReplyQueue} = amqp_channel:call(Channel, #'queue.declare'{}),
- Publish = #'basic.publish'{exchange = <<"">>, routing_key = <<"report_print">>},
- Props = #'P_basic'{reply_to = ReplyQueue, headers = ["key", "value"]},
- Msg = #amqp_msg{props = Props, payload = term_to_binary(<<"Hello, world!">>)},
- amqp_channel:cast(Channel, Publish, Msg).
- % ...
- amqp_channel:subscribe(Channel, #'basic.consume'{queue = ReplyQueue, no_ack = true}, self()),
- receive
- #'basic.consume_ok'{} -> ok
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement