Hi Kishanthan,

We should first see if a subscription get created in MB side when you
register a subscriber. Can you see any log like
"Added Subscription x to queue y" ?

There was an issue with message counting in last release of Message Broker.
Thus better if you not depend on that.

After messages are sent, and there is a positive message count in console,
can you just register a JMS client and see if the messages are being
received? Then we can conclude messages are sent without any prob.

I am not aware of RabblitMQ client configurations though.


On Sat, May 11, 2013 at 11:27 PM, Kishanthan Thangarajah <
[email protected]> wrote:

> Hi Folks,
>
> I'm giving a try to see whether $subject is possible.
>
> It seems i'm half way through :). I can send messages to MB using the
> RabbitMQ Java Client. I can see the message count increasing in MB Queue
> mgt console. But the same is not working when receiving messages.
>
> I'm just posting this to know whether am I missing any other
> info/configurations here?
>
> As with RabbitMQ broker, I followed the same steps here. i.e. started
> wso2mb (2.0.1), did not make any changes(config), and used the following
> same sender and receiver client to send/receive messages. I can see that
> my receiver is successfully creating connection to MB at amqp://
> [email protected]:5672/.
>
> Here is my sample Sender and Receiver
>
> *Sender:*
> *
> *    ConnectionFactory factory = new ConnectionFactory();
>     factory.setHost("192.168.0.4");
>     factory.setUsername("admin");
>     factory.setPassword("admin");
>     Connection connection = factory.newConnection();
>     Channel channel = connection.createChannel();
>     channel.queueDeclare(QUEUE_NAME,false,false,false,null);
>     String message = "Hello World!";
>     channel.basicPublish("",QUEUE_NAME,null,message.getBytes());
>     channel.close();
>     connection.close();
>
> *Receiver:*
>
>     ConnectionFactory factory = new ConnectionFactory();
>     factory.setHost("192.168.0.4");
>     factory.setUsername("admin");
>     factory.setPassword("admin");
>     Connection connection = factory.newConnection();
>     Channel channel = connection.createChannel();
>
>     channel.queueDeclare(QUEUE_NAME,false,false,false,null);
>     System.out.println(" ***** Waiting for messages.);
>     QueueingConsumer consumer = new QueueingConsumer(channel);
>     channel.basicConsume(QUEUE_NAME,true,consumer);
>
>     while(true) {
>         QueueingConsumer.Delivery delivery = consumer.nextDelivery();
>         String message = new String(delivery.getBody());
>         System.out.println(" Received '" + message + "'");
>     }
>
> Thanks,
> Kishanthan
>



-- 
*Hasitha Abeykoon*
Software Engineer; WSO2, Inc.; http://wso2.com
*cell:* *+94 719363063*
*blog: **abeykoon.blogspot.com* <http://abeykoon.blogspot.com>* *
*
*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to