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

Minor improvement in RabbitMQ executor #1500

Open
wants to merge 2 commits into
base: 4.x
Choose a base branch
from

Conversation

ivan-kripakov-m10
Copy link

@ivan-kripakov-m10 ivan-kripakov-m10 commented Mar 19, 2024

Provide possibility to decide whether to create queues when using RabbitMQ executor and possibility to choose queue's configuration (durable, auto_delete, exclusive) if user decides to create the queue via plugin.
Also allows users to customize message publishing using messageId, contentType and delivery_mode options.

@ivan-kripakov-m10 ivan-kripakov-m10 marked this pull request as ready for review March 23, 2024 14:19
@ivan-kripakov-m10 ivan-kripakov-m10 changed the title minor improvement in rabbit mq executor Minor improvement in RabbitMQ executor Mar 23, 2024
}

func createQueueIfNecessary(cfg map[string]string, queue string, ch *amqp.Channel) error {
if val, ok := cfg["queue.create"]; !ok || (ok && val == "false") {
Copy link
Member

Choose a reason for hiding this comment

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

Should this query rabbit in order to check if the queue already exists?

Copy link
Author

Choose a reason for hiding this comment

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

I think we don't need to check if the queue exists here. If the user chooses not to create the queue via the plugin, we expect him to create it manually.
If the user doesn't declare the queue, message publishing will fail with error in logs or a failed execution in UI.

Copy link
Member

@vcastellm vcastellm left a comment

Choose a reason for hiding this comment

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

LGTM aside from comment

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.

None yet

2 participants