Python stomp example

543 views
Skip to first unread message

Andy Middleton

unread,
Apr 28, 2021, 7:55:29 AM4/28/21
to A gathering place for the Open Rail Data community

Hi everyone,

Is the Python example for Stomp (https://github.com/openraildata/stomp-client-python) currently working OK?

I have been trying to get it to work and believe I am connecting OK. If I connect to the knowledgebase incidents feed or darwin.status I get 'Heartbeat received' messages but nothing else. darwin.pushport-v16 however gives an instant 'Disconnected waiting 15 seconds before exiting'.

I am something of a Python newbie but have checked and triple-checked everything so before tearing any more hair out I thought perhaps I should get a confirmation that the example is actually working :-)

Thanks,
Andy

Sandy Forrest

unread,
May 8, 2021, 5:40:43 PM5/8/21
to A gathering place for the Open Rail Data community
Did you ever resolve this issue, im seeing the same thing at the moment ... also not a python expert, but everything looks ok ... just getting the connection message immediately followed by disconnection message, nothing happens after the 15 secs however ?

Andy Middleton

unread,
May 9, 2021, 7:29:11 AM5/9/21
to A gathering place for the Open Rail Data community
Hi,

Unfortunately no, I have tried everything and have got no further.

Andy

Steve Ardagh-Walter

unread,
May 22, 2021, 2:10:00 AM5/22/21
to A gathering place for the Open Rail Data community
Hi Andy

I've been using stomp.py in local development mode quite happily for the last 6 months.    I don't use darwin, however connect to several TD & TRUST feeds.   A minor niggle has been that auto restart doesn't work on a Mac (I have a system healthcheck and restart the container after 30s inactivity), however this should be resolved as I'm moving to an Ubuntu server

I looked at the NR example code but have diverged from it a bit, I think I've referred more to the author's (Jason Briggs) github pages

Have you tried debugging with a couple of breakpoints, eg in the connect_and_subscribe function ?

Steve

Reply all
Reply to author
Forward
0 new messages