Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR:stompest.async.client:Ignoring message (no handler found) #17

Closed
cysin opened this issue Dec 11, 2013 · 5 comments
Closed

ERROR:stompest.async.client:Ignoring message (no handler found) #17

cysin opened this issue Dec 11, 2013 · 5 comments
Labels

Comments

@cysin
Copy link

cysin commented Dec 11, 2013

I tried to run the consumer example ,but always got this error

ERROR:stompest.async.client:Ignoring message (no handler found)

How to fix this?

@nikipore
Copy link
Owner

I've just tested the examples against version 2.1.2, running producer.py, transformer.py and consumer.py in that order with a Python 2.6.2 interpreter against an ActiveMQ 5.8 broker. It works just fine. Can you elaborate a bit more on your exact test setup?

@cysin
Copy link
Author

cysin commented Dec 11, 2013

I am using the ActiveMQ 5.9 downloaded from official site on a CentOS 6.4 box with Python 2.6.6, following these steps:

  1. git clone stompest and run 'python setup.py install' in 'core' and 'async' directory.
  2. build a topic on ActiveMQ and pushed some message
  3. change the host and the topic name in consumer.py

and here is the error:

ERROR:stompest.async.client:Ignoring message (no handler found): ID:localhost.localdomain-37200-1386744165022-2:1:-1:1:1 [MESSAGE frame [headers={u'content-length': u'19', u'destination': u'/queue/MY.PASSINF', u'timestamp': u'1386744563403', u'expires': u'0', u'priority': u'4', u'redelivered': u'true', u'message-id': u'ID:localhost.localdomain-37200-1386744165022-2:1:-1:1:1'}, body='2013-12-11 14:41:49', version=1.0]]

I am new to ActiveMQ and stompest and any help is appreciated

@cysin
Copy link
Author

cysin commented Dec 11, 2013

I think it should be the exception on line 226 in session.py, but how it comes, I've no idea about it.

218     def message(self, frame):
219         """Handle a **MESSAGE** frame. Returns a token which you can use to match this message to its subscription.
220 
221         .. seealso :: The :meth:`subscribe` method.
222         """
223         self.__check('message', [self.CONNECTED])
224         token = commands.message(frame)
225         if token not in self._subscriptions:
226             raise StompProtocolError('No such subscription [%s=%s]' % token)
227         return token

@nikipore
Copy link
Owner

To begin with, the example is designed s.t. you start producer.py first, then transformer.py, and at last consumer.py without changing anything but your broker's host, port, and credentials. No need to create a queue or topic beforehand. Even more, delete or purge any existing topic or queue via the web interface. If the example works then, the software or any other component (broker, OS, python version, twisted, you name it) most likely is not the problem.

The error you are describing happens when you have an incoming message from another subscription for which there is no handler registered. The message's headers show that it has been redelivered, so it is really not very well defined what's coming in after all. Delete or purge your queue and restart from scratch, modifying the example producer and consumer step by step. You can also produce messages using the sync client. Look inside the log. On level DEBUG, you see quite bit about incoming messages.

@cysin
Copy link
Author

cysin commented Dec 12, 2013

It's really my stupid mistakes, I forgot the prefix '/topic/' in the destination. Now all works fine. Thank you nikipore~

@cysin cysin closed this as completed Dec 12, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants