[rabbitmq-discuss] Can't read messages with erlang client

Mark Geib mark.geib at echostar.com
Sat Jan 31 17:20:37 GMT 2009


For the producer I do...
   Connection = lib_amqp:start_connection("localhost"),
   Channel = lib_amqp:start_channel(Connection),
   X = <<"cse.sms.commands">>,
   K = <<"test.messages">>,
   lib_amqp:declare_exchange(Channel, X, <<"topic">>),
   Payload = list_to_binary("This is a test message"),
   Reply = lib_amqp:publish(Channel, X, K, Payload),

In the consumer I am doing...
     Connection = lib_amqp:start_connection("localhost"),
     Channel = lib_amqp:start_channel(Connection),
     X = <<"cse.sms.commands">>,
     K = <<"test.messages">>,
     lib_amqp:declare_exchange(Channel, X, <<"topic">>),
     Q = lib_amqp:declare_queue(Channel),
     lib_amqp:bind_queue(Channel, X, Q, K),
     GetReply = lib_amqp:get(Channel, Q, false),

Mark.


Ben Hood wrote:
> Mark,
> 
> On Sat, Jan 31, 2009 at 2:27 AM, Geib, Mark <Mark.Geib at echostar.com> wrote:
>> I have another erlang app that is constantly sending messages. So the answer
>> is both.
>> I have looked at the queue with rabbitmq and the number of messages
>> constantly grows, I just can't seem to 'get' them.
> 
> Would it be possible for you to send the code for this so that I can
> reproduce it?
> 
> Ben
> 

-- 
Principal Engineer
Cheyenne Software Engineering
mark.geib at echostar.com / 35-215





More information about the rabbitmq-discuss mailing list