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

Use symfony/amazon-sqs-messenger Transport for sending messages #29

Closed
tomcoonen opened this issue Jun 4, 2020 · 6 comments · Fixed by #38
Closed

Use symfony/amazon-sqs-messenger Transport for sending messages #29

tomcoonen opened this issue Jun 4, 2020 · 6 comments · Fixed by #38

Comments

@tomcoonen
Copy link

I was wondering if it is an idea now symfony/amazon-sqs-messenger is released, to use the Transport from that package so this package handles only the serverless consumer side?
Does that make sense?

I doesn't seem right to keep that functionality in 2 places?

@mnapoli
Copy link
Member

mnapoli commented Jun 8, 2020

Hi, do you know if there are advantages or downsides for each solution?

@starred-gijs
Copy link
Contributor

I can think of the following possible advantages:

  • Possibility to consume via messenger:consume command (sandbox/development) (I have a fork for this now)
  • Less maintenance, more in sync with official Symfony package (both use async-aws/sqs client internally now)
  • auto-setup feature; if the SQS queue does not exist, it is created on the fly
  • Fifo queues support via Stamp (including DeduplicationId)

I compared the TransportInterface:send implementations, but the are very similar, except:

  1. All headers encoded in 1 string vs each header in MessageAttribute
  2. Support for DeduplicationId
  3. Fifo support (not sure)

Possible downside:

  • Less control over implementation?

@tomcoonen
Copy link
Author

@starred-gijs you beat me to it ;)

I don't have anything to add, point 1, 2 and 3 mentioned by Gijs are most important for my use case.

Once you go serverless, you can use this package to consume the messages.
Would be nice to add some documentation on how to configure this.

@starred-gijs
Copy link
Contributor

Give me a couple of days to create a PR

@tomcoonen
Copy link
Author

@starred-gijs if I can help let me know

@starred-gijs
Copy link
Contributor

@tomcoonen Would be helpful if you too could test this!

Im using both the php and symfony serializer in my project, so I need to wait for next release, see #31

ps: be aware that if you use the Symfony Serializer this PR will create a BC issue, because of the different way the MessageAttributes are stored.

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