Giter Club home page Giter Club logo

Comments (1)

nikipore avatar nikipore commented on September 28, 2024

You are correct. I missed to update the example: The ReceiptListener is by default no longer added to the async.Stomp client, and I now show in the example how to activate receipt handling:

client = yield Stomp(self.config).connect()
client.add(ReceiptListener(1.0))

I find interesting that your ActiveMQ 5.8 broker seems to negotiate a non-trivial heart-beating (of 5000 ms) without having been asked. IMHO it shouldn't, and mine doesn't, even if I turn on STOMP 1.2:

config = StompConfig('tcp://localhost:61613', version=StompSpec.VERSION_1_2)
INFO:stompest.async.protocol:Connecting to localhost:61613 ...
DEBUG:stompest.async.protocol:Sending CONNECT frame [headers={u'host': '', u'accept-version': '1.0,1.1,1.2'}, version=1.0]
DEBUG:stompest.async.protocol:Received CONNECTED frame [headers={u'session': u'ID:macbook-jan.fritz.box-53553-1361946054321-2:9097', u'heart-beat': u'0,0', u'version': u'1.2', u'server': u'ActiveMQ/5.8.0'}, version=1.0]
INFO:stompest.async.client:Connected to stomp broker [session=ID:macbook-jan.fritz.box-53553-1361946054321-2:9097, version=1.2]
DEBUG:stompest.async.protocol:Sending SEND frame [headers={u'destination': '/queue/testIn', u'receipt': 'message-0'}, body='{"count": 0}', version=1.2]
DEBUG:stompest.async.listener:Waiting for receipt message-0 started.
DEBUG:stompest.async.protocol:Received RECEIPT frame [headers={u'receipt-id': u'message-0'}, version=1.2]
DEBUG:stompest.async.protocol:Received heart-beat
DEBUG:stompest.async.listener:Waiting for receipt message-0 complete.
DEBUG:stompest.async.protocol:Sending SEND frame [headers={u'destination': '/queue/testIn', u'receipt': 'message-1'}, body='{"count": 1}', version=1.2]
DEBUG:stompest.async.listener:Waiting for receipt message-1 started.
DEBUG:stompest.async.protocol:Received RECEIPT frame [headers={u'receipt-id': u'message-1'}, version=1.2]
DEBUG:stompest.async.protocol:Received heart-beat
DEBUG:stompest.async.listener:Waiting for receipt message-1 complete.
DEBUG:stompest.async.protocol:Sending SEND frame [headers={u'destination': '/queue/testIn', u'receipt': 'message-2'}, body='{"count": 2}', version=1.2]
DEBUG:stompest.async.listener:Waiting for receipt message-2 started.
DEBUG:stompest.async.protocol:Received RECEIPT frame [headers={u'receipt-id': u'message-2'}, version=1.2]
DEBUG:stompest.async.protocol:Received heart-beat
DEBUG:stompest.async.listener:Waiting for receipt message-2 complete.
DEBUG:stompest.async.protocol:Sending SEND frame [headers={u'destination': '/queue/testIn', u'receipt': 'message-3'}, body='{"count": 3}', version=1.2]
DEBUG:stompest.async.listener:Waiting for receipt message-3 started.
DEBUG:stompest.async.protocol:Received RECEIPT frame [headers={u'receipt-id': u'message-3'}, version=1.2]
DEBUG:stompest.async.protocol:Received heart-beat
DEBUG:stompest.async.listener:Waiting for receipt message-3 complete.
DEBUG:stompest.async.protocol:Sending SEND frame [headers={u'destination': '/queue/testIn', u'receipt': 'message-4'}, body='{"count": 4}', version=1.2]
DEBUG:stompest.async.listener:Waiting for receipt message-4 started.
DEBUG:stompest.async.protocol:Received RECEIPT frame [headers={u'receipt-id': u'message-4'}, version=1.2]
DEBUG:stompest.async.protocol:Received heart-beat
DEBUG:stompest.async.listener:Waiting for receipt message-4 complete.
DEBUG:stompest.async.protocol:Sending SEND frame [headers={u'destination': '/queue/testIn', u'receipt': 'message-5'}, body='{"count": 5}', version=1.2]
DEBUG:stompest.async.listener:Waiting for receipt message-5 started.
DEBUG:stompest.async.protocol:Received RECEIPT frame [headers={u'receipt-id': u'message-5'}, version=1.2]
DEBUG:stompest.async.protocol:Received heart-beat
DEBUG:stompest.async.listener:Waiting for receipt message-5 complete.
DEBUG:stompest.async.protocol:Sending SEND frame [headers={u'destination': '/queue/testIn', u'receipt': 'message-6'}, body='{"count": 6}', version=1.2]
DEBUG:stompest.async.listener:Waiting for receipt message-6 started.
DEBUG:stompest.async.protocol:Received RECEIPT frame [headers={u'receipt-id': u'message-6'}, version=1.2]
DEBUG:stompest.async.protocol:Received heart-beat
DEBUG:stompest.async.listener:Waiting for receipt message-6 complete.
DEBUG:stompest.async.protocol:Sending SEND frame [headers={u'destination': '/queue/testIn', u'receipt': 'message-7'}, body='{"count": 7}', version=1.2]
DEBUG:stompest.async.listener:Waiting for receipt message-7 started.
DEBUG:stompest.async.protocol:Received RECEIPT frame [headers={u'receipt-id': u'message-7'}, version=1.2]
DEBUG:stompest.async.protocol:Received heart-beat
DEBUG:stompest.async.listener:Waiting for receipt message-7 complete.
DEBUG:stompest.async.protocol:Sending SEND frame [headers={u'destination': '/queue/testIn', u'receipt': 'message-8'}, body='{"count": 8}', version=1.2]
DEBUG:stompest.async.listener:Waiting for receipt message-8 started.
DEBUG:stompest.async.protocol:Received RECEIPT frame [headers={u'receipt-id': u'message-8'}, version=1.2]
DEBUG:stompest.async.protocol:Received heart-beat
DEBUG:stompest.async.listener:Waiting for receipt message-8 complete.
DEBUG:stompest.async.protocol:Sending SEND frame [headers={u'destination': '/queue/testIn', u'receipt': 'message-9'}, body='{"count": 9}', version=1.2]
DEBUG:stompest.async.listener:Waiting for receipt message-9 started.
DEBUG:stompest.async.protocol:Received RECEIPT frame [headers={u'receipt-id': u'message-9'}, version=1.2]
DEBUG:stompest.async.protocol:Received heart-beat
DEBUG:stompest.async.listener:Waiting for receipt message-9 complete.
INFO:stompest.async.listener:Disconnecting ...
DEBUG:stompest.async.protocol:Sending DISCONNECT frame [headers={u'receipt': 'bye'}, version=1.2]
DEBUG:stompest.async.listener:Waiting for receipt bye started.
DEBUG:stompest.async.protocol:Received RECEIPT frame [headers={u'receipt-id': u'bye'}, version=1.2]
DEBUG:stompest.async.protocol:Received heart-beat
DEBUG:stompest.async.listener:Waiting for receipt bye complete.

The client believes it has received heart-beats because ActiveMQ seems to send an extra LF after each RECEIPT frame.

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.