tag:blogger.com,1999:blog-5003701650524272230.post6852653245130987883..comments2023-05-15T08:30:40.114-05:00Comments on Programming fun at startup: RabbitMQ java clients for beginnersKalpesh Patelhttp://www.blogger.com/profile/05753943463214172718noreply@blogger.comBlogger23125tag:blogger.com,1999:blog-5003701650524272230.post-43630354255053703442018-03-22T06:05:04.211-05:002018-03-22T06:05:04.211-05:00How to apply the message selectors in RabbitMQ que...How to apply the message selectors in RabbitMQ queue.We can achieve using ActiveMQ functionality Anonymoushttps://www.blogger.com/profile/01263576435930556689noreply@blogger.comtag:blogger.com,1999:blog-5003701650524272230.post-30611060891215511062012-07-30T13:27:37.183-05:002012-07-30T13:27:37.183-05:00How to read messages from RabbitMQ's queue by ...How to read messages from RabbitMQ's queue by having a tomcat server listen at a port without using Sprin framework? Any help is greatly appreciatedAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-5003701650524272230.post-1618704702558726232012-06-01T22:44:24.814-05:002012-06-01T22:44:24.814-05:00Yes last I know you can only run command all I get...Yes last I know you can only run command all I get is queue sizes.You can replicate the python program I wrote in java as basically you consume the messages but dont acknowledge it.<br /><br />"kpatel@kpatel-laptop:~$ sudo rabbitmqctl list_queues<br />[sudo] password for kpatel: <br />Listing queues ...<br />thumbnail_gen_queue 0<br />localhost:8080_bill_queue 0<br />"Kalpesh Patelhttps://www.blogger.com/profile/05753943463214172718noreply@blogger.comtag:blogger.com,1999:blog-5003701650524272230.post-72459611316861510332012-05-31T09:39:31.356-05:002012-05-31T09:39:31.356-05:00So your are telling that there is no way to see th...So your are telling that there is no way to see the messaging queue console in rabbitmq via., writing java classes rite? So can you please suggest me any other possible way except (python program) to do a messaging queue kind of thing related to java program? Because i supposed to do this in java. (Already i wrote two java classes one is producer and another one is a consumer class, it is running exactly and i can see the sending and receiving of messages alone in eclipse IDE console and i couldn't see this in rabbitmq console for this process only i need a solution from somebody). Thanks in advance.Anonymoushttps://www.blogger.com/profile/10940636153011985164noreply@blogger.comtag:blogger.com,1999:blog-5003701650524272230.post-66423725495442090952012-05-31T07:49:07.666-05:002012-05-31T07:49:07.666-05:00Last I know there was no option to view the queue ...Last I know there was no option to view the queue contents so the trick is to just write a python program that would consume the message but wont acknowledge it. You might check this out http://neopatel.blogspot.com/2010/07/dumping-rabbitmq-queue-contents.htmlKalpesh Patelhttps://www.blogger.com/profile/05753943463214172718noreply@blogger.comtag:blogger.com,1999:blog-5003701650524272230.post-83135976057037929072012-05-31T00:46:41.862-05:002012-05-31T00:46:41.862-05:00Again thanks for your reply Kalpesh, after writing...Again thanks for your reply Kalpesh, after writing both the producer as well as consumer java class in eclipse IDE, how i need to see both the sending and receiving messages in rabbitmq console i.e., via localhost in browser. Can any one explain about this process exactly please? Thanks in advance.Anonymoushttps://www.blogger.com/profile/10940636153011985164noreply@blogger.comtag:blogger.com,1999:blog-5003701650524272230.post-75680001299371939652012-05-30T07:50:01.736-05:002012-05-30T07:50:01.736-05:00RabbitMQ is like a database server so you have to ...RabbitMQ is like a database server so you have to start it from command line if you are on windows(I havent used on windows), then you write programs to produce/consumer messages from it. So rabbitmq is just a broker.Kalpesh Patelhttps://www.blogger.com/profile/05753943463214172718noreply@blogger.comtag:blogger.com,1999:blog-5003701650524272230.post-54006333948081000302012-05-29T00:37:06.381-05:002012-05-29T00:37:06.381-05:00Thanks for your help, i went through the link whic...Thanks for your help, i went through the link which you sent to me before,please suggest me whether i need to configure this rabbitmq in eclipse sdk (or) else i need to use this via console. I'm trying to do a messaging queue kind of a thing by having one sender and receiver, but i don't know exactly how to do this, and how to run this process on rabbitmq? If anyone know about this please help me over this. Thanks in advance.Anonymoushttps://www.blogger.com/profile/10940636153011985164noreply@blogger.comtag:blogger.com,1999:blog-5003701650524272230.post-36632353373970914002012-05-28T17:58:24.513-05:002012-05-28T17:58:24.513-05:00RabbitMQ is a server and AMQP is the protocol it i...RabbitMQ is a server and AMQP is the protocol it implements. I suggest you read http://blogs.digitar.com/jjww/2009/01/rabbits-and-warrens/ for more info.Kalpesh Patelhttps://www.blogger.com/profile/05753943463214172718noreply@blogger.comtag:blogger.com,1999:blog-5003701650524272230.post-7046855646036855092012-05-28T09:18:48.187-05:002012-05-28T09:18:48.187-05:00Can anyone please suggest whether Rabbitmq is a se...Can anyone please suggest whether Rabbitmq is a server (or) messaging protocol? Because i tried to start this rabbitmq using command line utility along with the batch files which is there inside the rabbitmq server folder(rabbitmq-server.bat,rabbitmq-service.bat)via console, but it doesn't works for me exactly. Thanks in advance.Anonymoushttps://www.blogger.com/profile/10940636153011985164noreply@blogger.comtag:blogger.com,1999:blog-5003701650524272230.post-42439841246989964192010-12-06T21:17:20.118-06:002010-12-06T21:17:20.118-06:00Did you checked if there is a Firewall blocking it...Did you checked if there is a Firewall blocking it? I have never seen connection timed out connecting to rabbit server.Kalpesh Patelhttps://www.blogger.com/profile/05753943463214172718noreply@blogger.comtag:blogger.com,1999:blog-5003701650524272230.post-84776290526651303302010-12-06T01:30:19.154-06:002010-12-06T01:30:19.154-06:00Hey, thanks for the code, very helpful. I can run...Hey, thanks for the code, very helpful. I can run this on the same machine as the RabbitMQ server but can't connect when I run it on another machine and specify the host or ip address. Any ideas on what I need to do to enable. Failure results in either connection timed out or authentication error.<br /><br />Thanks!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5003701650524272230.post-75811359200907059462010-10-10T11:59:39.834-05:002010-10-10T11:59:39.834-05:00Hi Kalpesh ,
I tried the command and foud the resu...Hi Kalpesh ,<br />I tried the command and foud the results below. The daemon thread is running.Can you suggest me what can be done to set it right . <br /><br /><br />rabbitmq 1252 1 0 09:34 ? 00:00:00 /usr/lib/erlang/erts-5.7.4/bin/epmd -daemon<br />rudy 7429 7382 0 22:20 pts/0 00:00:00 grep --color=auto rabbitmqUnknownhttps://www.blogger.com/profile/08314624185505676831noreply@blogger.comtag:blogger.com,1999:blog-5003701650524272230.post-61188501843828193212010-10-05T15:02:54.426-05:002010-10-05T15:02:54.426-05:00Rudra this says connection refused which tells me ...Rudra this says connection refused which tells me that your rabbitmq is not up. Did your rabbitmq install went fine? Can you run ps -ef|grep rabbitmq or task manager and see it running?Kalpesh Patelhttps://www.blogger.com/profile/05753943463214172718noreply@blogger.comtag:blogger.com,1999:blog-5003701650524272230.post-73927986231162026872010-10-05T13:13:20.960-05:002010-10-05T13:13:20.960-05:00Hi ,
I am new to RabbitMQ trying to play with Jav...Hi , <br />I am new to RabbitMQ trying to play with Java. I have a typical problem which shows error as below. I am not sure where it went wrong while executing the .jar file. I try to follow the program above by you but it seems the problem lies somewhere else. Can you help me please.<br /><br />Exception in thread "main" java.net.ConnectException: Connection refused<br /> at java.net.PlainSocketImpl.socketConnect(Native Method)<br /> at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:310)<br /> at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:176)<br /> at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:163)<br /> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)<br /> at java.net.Socket.connect(Socket.java:546)<br /> at java.net.Socket.connect(Socket.java:495)<br /> at com.rabbitmq.client.ConnectionFactory.createFrameHandler(ConnectionFactory.java:338)<br /> at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:376)<br /> at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:399)Unknownhttps://www.blogger.com/profile/08314624185505676831noreply@blogger.comtag:blogger.com,1999:blog-5003701650524272230.post-58416337627483788012010-09-24T06:03:52.164-05:002010-09-24T06:03:52.164-05:00Thanks man this is really beneficial for beginner ...Thanks man this is really beneficial for beginner .Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5003701650524272230.post-30124300626061647682010-07-26T17:48:04.034-05:002010-07-26T17:48:04.034-05:00Sorry I didn't understood the question properl...Sorry I didn't understood the question properly. But let me answer from what I understood, if you want the application to consumer message as soon as its up, thats what the consumer program I have written does but it does for a simple main program launched at command line. If you want to do it for a web application then you can create a Thread from javax.servlet.ServletContextListener that would do the same. The thread in its run method can do the same loop I am doing in class RabbitMQConsumer.Kalpesh Patelhttps://www.blogger.com/profile/05753943463214172718noreply@blogger.comtag:blogger.com,1999:blog-5003701650524272230.post-84367269208118365862010-07-26T15:07:47.278-05:002010-07-26T15:07:47.278-05:00can u let me know how to assign the consumer to a ...can u let me know how to assign the consumer to a listener which will start listening at the application start upAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-5003701650524272230.post-34451832922254022582010-07-06T22:17:17.427-05:002010-07-06T22:17:17.427-05:00Thanks updated the code.Thanks updated the code.Kalpesh Patelhttps://www.blogger.com/profile/05753943463214172718noreply@blogger.comtag:blogger.com,1999:blog-5003701650524272230.post-11734149189842835022010-07-06T09:53:27.880-05:002010-07-06T09:53:27.880-05:00This code it is not valid for the last version Rab...This code it is not valid for the last version RabbitMQ Java API 1.8 :<br /><br />ConnectionParameters no longer exists, to make it work it should be changed for:<br /><br />ConnectionFactory factory = new ConnectionFactory();<br />factory.setUsername(userName);<br />factory.setPassword(password);<br />factory.setVirtualHost(virtualHost);<br />factory.setHostName(hostName);<br />factory.setPortNumber(portNumber);<br />Connection conn = factory.newConnection();Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5003701650524272230.post-34811474381324626892010-06-29T08:45:48.520-05:002010-06-29T08:45:48.520-05:00......Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5003701650524272230.post-1588578494036557392010-04-23T07:59:09.453-05:002010-04-23T07:59:09.453-05:00Thanks I am glad it was useful for someone.Thanks I am glad it was useful for someone.Kalpesh Patelhttps://www.blogger.com/profile/05753943463214172718noreply@blogger.comtag:blogger.com,1999:blog-5003701650524272230.post-9153879036871483212010-04-22T12:36:24.989-05:002010-04-22T12:36:24.989-05:00Thanks for this, man...Thanks for this, man...Anonymousnoreply@blogger.com