Hi I am looking for simple solution on rabbit mq. Below are the settings been done on the rabbit.
- Start the rabbit server
- create exchange (myexchange) of type topic with durable option.
- create the queue (myqueue) with durable option and x-max-length-bytes set to 4 and x-max-length set to 2.
- Bind the myexchange with myrouting to myqueue.
- Publish message using the basic_publish using aqmp channel (channel.basicPublish(myexchange, myrouting, true, null, "test".getBytes("UTF-8"));
- Use publisher confirm settings like channel.confirmSelect(); and channel.waitForConfirmsOrDie();
Code snippet below
channel = connectionFactory.getChannel();
channel.queueDeclarePassive("myqueue");
channel.confirmSelect();
channel.basicPublish("myexchange", "myrouting", true,
null, "test".getBytes("UTF-8"));
channel.waitForConfirmsOrDie();
Now the rabbit mq is not replying with error for the number of messages exceeded/size exceeded. I could able to send 1000 messages/with 1kb size and the consumer also consuming all these messages. So how could I get the error code? Any help on this please?