Giter Club home page Giter Club logo

Comments (5)

nikipore avatar nikipore commented on June 23, 2024

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?

from stompest.

cysin avatar cysin commented on June 23, 2024

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

from stompest.

cysin avatar cysin commented on June 23, 2024

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

from stompest.

nikipore avatar nikipore commented on June 23, 2024

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.

from stompest.

cysin avatar cysin commented on June 23, 2024

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

from stompest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.