-
Notifications
You must be signed in to change notification settings - Fork 50
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
Session re-creates durable JMS topic exchange between restarts #456
Labels
Comments
acogoluegnes
added a commit
that referenced
this issue
Jun 20, 2024
jjank
pushed a commit
to jjank/rabbitmq-jms-client
that referenced
this issue
Sep 12, 2024
References rabbitmq#456 (cherry picked from commit fbed08b)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The library creates a session-scoped durable JMS topic exchange for durable topic subscribers with a selector. It uses a UUID in the name. The exchange is not deleted between restarts (to keep messages for closed durable subscribers), so a new session would create yet another exchange. The documentation explains this design. A new binding with the selector arguments is created between the exchange and the subscriber queue.
This avoids creating an exchange for each subscriber, but it makes it impossible to re-use the existing exchange, making the exchanges leak until the subscribers unsubscribe.
It'd be more appropriate to create a dedicated exchange for each durable subscriber with a selector. The name would be based on the topic and subscription names (using a hashing mechanism, to control the length), this way the exchange could be re-used between restarts.
The name could use a MD5 of the topic and subscription names, with a base 64 encoding (
+
replaced by-
,/
by_
,=
removed). This is the algorithm used for server-named queues.Original discussion: #454
The text was updated successfully, but these errors were encountered: