Upcoming Games

(UTC times)


Full list
Add a game

Upcoming Events

No events to display

STOMP issues: STOMP 1.1 and ack:auto

You are here: Home > Forum > Customising SimSig > Interface Gateway > STOMP issues: STOMP 1.1 and ack:auto

Page 1 of 1

STOMP issues: STOMP 1.1 and ack:auto 02/04/2025 at 18:30 #160779
DonRiver
Avatar
176 posts
Every year or two I get enthused with the idea of making an Interface Gateway client - this time in Rust! And I keep tripping over the same problems:

- SimSig Interface Gateway doesn't just use the STOMP protocol, it uses STOMP 1.1 specifically. Most client libraries (for Rust anyway) are for STOMP 1.2 specifically. It's not much faff to hack them into working with STOMP 1.1 instead but please could the wiki be updated to specify you need to write a STOMP 1.1 client?

- SimSig Interface Gateway has a bug where it gives an error if a SUBSCRIBE frame is missing the `ack` header. The STOMP 1.1 spec says that `ack` defaults to `auto` if it's not set: https://stomp.github.io/stomp-specification-1.1.html#SUBSCRIBE

It'd be nice if this was fixed, however, it'd be perfectly fine to just update the wiki with this detail that you must ensure the SUBSCRIBE frame headers include `ack:auto`.

Here's a screenshot from Wireshark - the first SUBSCRIBE has no `ack` header and SimSig replies with "ERROR - Invalid ack mode". The second SUBSCRIBE includes `ack:auto` and is accepted.



`\n` is a newline, so this is the failing frame:
Quote:
SUBSCRIBE
destination:/topic/TD_ALL_SIG_AREA
id:myid
(empty line)
And this is the successful one:

Quote:
SUBSCRIBE
destination:/topic/TD_ALL_SIG_AREA
id:myid
ack:auto
(empty line)
- Could the wiki also clarify that when sending a message, the `content-type` headers must be `text/plain` not `application/json`?

Cheers!

Post has attachments. Log in to view them.
(named for the one in Tasmania, not in Russia)
Last edited: 02/04/2025 at 18:34 by DonRiver
Reason: to make changes

Log in to reply
The following user said thank you: dmaze
STOMP issues: STOMP 1.1 and ack:auto Yesterday at 08:52 #160780
GeoffM
Avatar
6412 posts
I'll have a look when I get back from holiday. Honestly, I'm glad someone is using it!
SimSig Boss
Log in to reply
The following user said thank you: DonRiver
STOMP issues: STOMP 1.1 and ack:auto Yesterday at 21:46 #160787
DonRiver
Avatar
176 posts
There's another wee bug... the crossing message's auto-raise parameter is named "auto_lower" - it seems if a crossing has an auto-lower control, there's a separate flag for it. (The only example I can find and test with is Marylebone's London Road Bicester crossing.)
(named for the one in Tasmania, not in Russia)
Log in to reply