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

fix consumers dlq configuration #3890

Merged
merged 5 commits into from
Oct 25, 2023
Merged

Conversation

riccardomodanese
Copy link
Contributor

@riccardomodanese riccardomodanese commented Oct 17, 2023

Brief description of the PR.
This pr cleans the Camel routes configuration (some old configuration was still present) and reorganizes dlq queues name
Introduces the $SYS prefix for internal use. This prefix is used for dlq and further internal feature and is not meant to be subscribed by external devices.

Related Issue
none

Description of the solution adopted
none

Screenshots
none

Any side note on the changes made
none, the effect of the changes is bound to internal components.
NO BACKPORT

@codecov
Copy link

codecov bot commented Oct 17, 2023

Codecov Report

Merging #3890 (9bc5860) into develop (4924fd7) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

❗ Current head 9bc5860 differs from pull request most recent head b60d8b7. Consider uploading reports for the commit b60d8b7 to get more accurate results

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #3890      +/-   ##
=============================================
- Coverage      20.55%   20.54%   -0.01%     
  Complexity         6        6              
=============================================
  Files           1940     1940              
  Lines          41540    41543       +3     
  Branches        3939     3940       +1     
=============================================
- Hits            8537     8534       -3     
- Misses         32606    32612       +6     
  Partials         397      397              
Files Coverage Δ
...ice/camel/listener/error/ErrorMessageListener.java 0.00% <ø> (ø)
...ua/client/security/ServiceClientMessagingImpl.java 0.00% <0.00%> (ø)
...se/kapua/commons/event/jms/JMSServiceEventBus.java 17.33% <0.00%> (ø)
...a/broker/artemis/plugin/security/ServerPlugin.java 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

@riccardomodanese riccardomodanese force-pushed the fix-camelRoutesAndDlq branch 2 times, most recently from 0087ec5 to 14744eb Compare October 20, 2023 12:23
<dead-letter-address>DLQ</dead-letter-address>
<expiry-address>ExpiryQueue</expiry-address>
<dead-letter-address>dlq</dead-letter-address>
<expiry-address>expired</expiry-address>
<redelivery-delay>0</redelivery-delay>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing $SYS/ prefix, is that right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not forgotten, it's the service broker used for authentication so for now I preferred to leave the queues without prefixes.
Do you suggest to use the prefix here (service broker) also? (in the event broker I prefer to leave namespace as it is now)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me it doesn't seem like a bad idea to use this separate namespace for internal messages, though I realize it's for a separate broker and adds a little overhead. Otherwise I think the PR is fine and will go ahead and approve.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest I'm not sure about which is the best solution. I mean, the telemetry broker handles both external load (messages from clients and Camel consumers) and internal (like the dlq for example)
On the other side the event and service brokers handle only internal load now (events are meant to be used only by internal components now and the authentication service is performed by a service consumer built for this scope).
Anyway having services and events deployed in the same broker could lead to a namespace conflicts.

Copy link
Contributor Author

@riccardomodanese riccardomodanese Oct 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think what you are suggesting worth to be implemented now.
I'm proposing a refactoring like this one (I'm going to implement it in a new commit)

Telemetry broker (only dlq):
$SYS/dlq/default
$SYS/dlq/expired

Event-broker:
$SYS/svc/evt/EVENT_ADDRESS

Service-broker:
$SYS/svc/ath/req
$SYS/svc/ath/resp/brokerId

Event/Service-broker dlq:
$SYS/svc/dlq/default
$SYS/svc/dlq/expired

I think it's a good proposal but I'm looking forward for your feedback!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that this separate namespace should help avoid conflicts and provide more flexibility with how components are deployed. I think it would also be helpful to consider now how it should be structured/used. For the telemetry dlq for example, should it also specify the service/consumer - i.e. "$SYS/telemetry/dlq/default", etc.?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I preferred to use MSG so the new addresses (last commit) are:

Telemetry broker
$SYS/MSG/dlq/default
$SYS/MSG/dlq/expired

Event-broker
$SYS/EVT/EVENT_ADDRESS

Service-broker
$SYS/SVC/auth/req
$SYS/SVC/auth/resp/brokerId

$SYS/SVC/dlq/default
$SYS/SVC/dlq/expired

I moved event prefix out of svc.
What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me!

@riccardomodanese riccardomodanese force-pushed the fix-camelRoutesAndDlq branch 3 times, most recently from c21c6db to b738a72 Compare October 23, 2023 14:38
@riccardomodanese riccardomodanese merged commit fa20c96 into develop Oct 25, 2023
@riccardomodanese riccardomodanese deleted the fix-camelRoutesAndDlq branch October 25, 2023 13:22
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 this pull request may close these issues.

3 participants