Skip to content

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

Closed

Description

@atrauzzi

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! 😅

Activity

  1. makasim commented on Jun 14, 2020

    @makasim
    Member

    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.

  2. atrauzzi commented on Jun 14, 2020

    @atrauzzi
    ContributorAuthor

    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?)

  3. stale commented on Jul 15, 2020

    @stale

    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.

  4. atrauzzi commented on Jul 15, 2020

    @atrauzzi
    ContributorAuthor

    Not stale.

  5. stale commented on Aug 14, 2020

    @stale

    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.

  6. atrauzzi commented on Aug 16, 2020

    @atrauzzi
    ContributorAuthor

    Not stale.

  7. makasim commented on Aug 21, 2020

    @makasim
    Member

    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

  8. makasim commented on Aug 21, 2020

    @makasim
    Member

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

  9. atrauzzi commented on Aug 21, 2020

    @atrauzzi
    ContributorAuthor

    That sounds good!

  10. atrauzzi commented on Sep 17, 2020

    @atrauzzi
    ContributorAuthor

    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?

  11. makasim commented on Sep 17, 2020

    @makasim
    Member

    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.

  12. makasim commented on Sep 17, 2020

    @makasim
    Member

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

  13. atrauzzi commented on Sep 17, 2020

    @atrauzzi
    ContributorAuthor

    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. ❤️

  14. makasim commented on Sep 17, 2020

    @makasim
    Member

    Sure thing!

  15. atrauzzi commented on Sep 17, 2020

    @atrauzzi
    ContributorAuthor

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

  16. atrauzzi commented on Sep 22, 2020

    @atrauzzi
    ContributorAuthor

    PR opened!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions