Skip to content
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

Don't use slashes in and prefix queue name with type in STOMP #1067

Closed
atrauzzi opened this issue Jun 14, 2020 · 16 comments · Fixed by #1091
Closed

Don't use slashes in and prefix queue name with type in STOMP #1067

atrauzzi opened this issue Jun 14, 2020 · 16 comments · Fixed by #1091

Comments

@atrauzzi
Copy link
Contributor

atrauzzi commented Jun 14, 2020

I've been working with publishing to a STOMP queue and I've noticed that all my messages are prefixed with /queue/, which is going against my desired scheme for messages.

Looking at StompDestination, I see that both the prefix and the slashes are hard-coded.

It comes to mind that it probably shouldn't be coded as such because everyone can and should be allowed to have their own conventions around how they namespace jobs (using.periods, maybe:colons, maybe/slashes, maybe\backslashes, etc...). Indeed, sometimes those conventions might be completely outside of their control! 😅

@makasim
Copy link
Member

makasim commented Jun 14, 2020

We hardcoded them because of RabbitMQ. It needs it this way to properly route messages and that was the only broker we tested STOMP with.

I guess you use another broker. Which one?

The current values should stay there because of backward compatibility promise. Though, We should definitely add a way to configure them.

Another idea is to use scheme like this stomp+rabbitmq://, stom+activemq:// to switch to a property settings.

@atrauzzi
Copy link
Contributor Author

atrauzzi commented Jun 14, 2020

Sounds good, I'm on ActiveMQ Artemis.

Maybe for now you can just detect the scheme stomp+rabbitmq and preserve the old behaviour, but a pure stomp scheme just bypasses prefixing altogether?

(Doing this ensures the backwards compat, but that frees up the bare stomp scheme from rabbitmq specifics. Would be easy enough to include a note in the release notes for rabbitmq users to update their connection strings?)

@stale
Copy link

stale bot commented Jul 15, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jul 15, 2020
@atrauzzi
Copy link
Contributor Author

Not stale.

@stale stale bot removed the wontfix label Jul 15, 2020
@stale
Copy link

stale bot commented Aug 14, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Aug 14, 2020
@atrauzzi
Copy link
Contributor Author

Not stale.

@stale stale bot removed the wontfix label Aug 16, 2020
@makasim
Copy link
Member

makasim commented Aug 21, 2020

but a pure stomp scheme just bypasses prefixing altogether

I wish we could do it but we cannot as it would break existing projects that use stomp and assume there are prefixes.

What we could do is to introduce new stomp+bare, or stomp-activemq schema that would work differently from current behavior

@makasim
Copy link
Member

makasim commented Aug 21, 2020

In next version (say 0.11.0) we could do it the way it should be.

@atrauzzi
Copy link
Contributor Author

That sounds good!

@atrauzzi
Copy link
Contributor Author

Hey @makasim, I just wanted to check to see if there's been any progress on this?

If not, is there any way I can fork the current stomp driver and modify it as I need?

@makasim
Copy link
Member

makasim commented Sep 17, 2020

It's a low priority project for me. So, dont expect much. I can review&merge PRs, do a release. That's pretty much it.

@makasim
Copy link
Member

makasim commented Sep 17, 2020

Feel free to fork this repository https://github.com/php-enqueue/stomp

@atrauzzi
Copy link
Contributor Author

atrauzzi commented Sep 17, 2020

Totally understand, is it okay if I ping here if I have any bizarro questions? I haven't started yet and I can't imagine I'm going to get really stumped. But just in case 😉

Either way, thank you for the guidance so far. ❤️

@makasim
Copy link
Member

makasim commented Sep 17, 2020

Sure thing!

@atrauzzi
Copy link
Contributor Author

Great. If what I make is deemed worthwhile, it'll obviously be available to incorporate back into enqueue.

@atrauzzi
Copy link
Contributor Author

PR opened!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants