-
Notifications
You must be signed in to change notification settings - Fork 25
Added TransportNameResolver for sns and sqs for automatic transport r… #84
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
Added TransportNameResolver for sns and sqs for automatic transport r… #84
Conversation
3040cba to
e59d589
Compare
|
Hi ! I get your point but this is clearly a BC break according to your current implementation. We may continue to support old way and add possibility to introduce your concept that would fallback on old |
|
Could you add documentation to help understand this? Hard for me to understand right now TBH. Also good point, we want to avoid BC breaks 👍 |
e59d589 to
b95006f
Compare
b95006f to
1fd1f89
Compare
|
@tyx yes, this would be a BC break :) I added the In an other merge request I would refactor the @mnapoli Yes, sure. It's in the README.md file now, let me know if this is understandable :)
|
a2525e5 to
7878370
Compare
7878370 to
74111e7
Compare
|
Hi ! I'm just a bref user like you ;) I'm sure Matthieu will do his best to review as soon as he has some free time |
|
Hello @mnapoli I don't want to pressure, but can you take a look at this, it's quite urgent 😅 would be really nice if this can be merged. Thank you! |
|
Hi @mnapoli , i was wondering if there is any update or plan about merging this? |
|
Merging since we have now 3 different users asking for it. It's always hard to judge how actually used/useful a feature is when not using it, I've made the mistake of merging stuff for 1% of users before and regretted it 😬 Also I have a rule not to merge stuff I don't understand or can't maintain. I'm breaking that rule here, I trust you guys to have reviewed and maintain it if you face issues 😅 |
|
I have no idea why but it seems GitHub Actions didn't run on this PR? On master PHPStan fails now, any idea if it's related to this PR? |
|
I will take a look on this :) @mnapoli |
|
@mnapoli I ignored the error here: https://github.com/brefphp/symfony-messenger/pull/85/files is this ok for you? |
|
Hi @robinlehrmann , I'm having trouble understanding the purpose and logic behind the SqsTransportNameResolver class. From what I see, it seems to be trying to match SQS transport names in the form of : Could you clarify how we’re supposed to configure the DSNs in order to make the automatic detection work as intended? Thanks in advance! |
|
Hi @Cafeine42 First of all you can see some details about this topic in #83 There you can see the following example: The "problem" beforehand was, that it was necessary to configure the In my scenario it was the case that I configured one SNS-Topic and at least one SQS per event. (Every SQS Queue has one subscriber, so if you have a different subscriber I created a different queue, to handle the dead letter queue entries as expected on failures. I would also suggest that for you, because this is also the best practice approach for AWS SNS fanout -> AWS SQS) However in your case you want to handle more then one event in your transports so I'm not 100% if this is possible with this approach or not. So if not you can just configure the |
|
In my use case, I use different SQS queues and different transports to manage the priority of exchanged messages. This way, high-priority messages—which are produced in small quantities and are very quick to process—don’t end up buried in a non-priority queue with potentially long processing times. We use SNS+SQS in another use case, but in this case, we don’t need it. I will create a PR so that transport resolution works when DSNs are configured as indicated in the Symfony documentation (https://sqs.eu-west-3.amazonaws.com/123456789012/messages). Here : #98 |
Hello :)
This will resolve #83
I thought it might be a good idea to parse the transports mapping in the
messenger.yamland map the transport with the eventSourceARN of a sqsEvent or the EventSubscriptionArn of a snsEvent with the configured transport.With this solution the
$transportNameis not required anymore and I don't need to create one lambda per sqs queue for my use case :) Would be great if you can take a look at this @mnapoli