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

Merged

Conversation

ivan-kripakov-m10
Copy link
Contributor

@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 force-pushed the rabbit_mq_plugin_updates branch from ee97ccf to 8ce2e10 Compare March 19, 2024 07:49
@ivan-kripakov-m10 ivan-kripakov-m10 marked this pull request as draft March 19, 2024 08:11
@ivan-kripakov-m10 ivan-kripakov-m10 force-pushed the rabbit_mq_plugin_updates branch from 8ce2e10 to f50de71 Compare March 23, 2024 14:19
@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 force-pushed the rabbit_mq_plugin_updates branch from 5c8a9c0 to 38efd8a Compare March 23, 2024 15:39
@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
Contributor 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

@vcastellm vcastellm merged commit 8324be2 into distribworks:4.x Jun 5, 2024
1 check passed
@ivan-kripakov-m10 ivan-kripakov-m10 deleted the rabbit_mq_plugin_updates branch June 5, 2024 10:03
vcastellm added a commit that referenced this pull request Oct 6, 2024
* Convert shell plugin to internal plugin (#975)

The purpose of this PR is to embed the shell plugin in the main dkron binary, that will facilitate creating a single binary with the most important executor, for easy deployment using a single binary.

* Remove old UI (#984)
* Release a light image tag (#988)

Omit all plugins except the shell plugin that will be included in the main binary.

* Upgrade react admin to v4 (#1436)

* Use exponential backoff for retries (#1433)

* Handle ip changes (#1446)
* consul like approach: add server_lookup to make dkron independent from server node IP on raft layer
* handle memberupdate event
* query other servers before start & add test
* don't remove itself if node is a raft leader
* don't remove dkron server node if id matches

* Move config init to agent command (#1465)

Config init was being done on the root level command but only the agent command was using config values.

Now config init is done as pre-run of agent command only, getting rid of extra messages in other commands when the config was missing.

* Fix disabled (#1467)
* Embed http plugin (#1471)

http plugin is one of the most used plugins together with the shell plugin, embedding it in the main binary allow for more lean deployment.

* Show all Job fields
* Refactor buttons for admin v4

* Docs v4 (#1473)

* Reuse http clients with the same configuration (#1474)
* Update OpenAPI spec to v3.1.0 and add ACLs spec
* Refactor location of types as they not only belong to plugins, but used in general. (#1485)

Also add Pro protobuf and gen code as this should be public.

* Generate client
* Extend protobuf defs for ACLs
* Token fields
* Minor improvement in RabbitMQ executor (#1500)
* nice and forkable goreleaser (#1584)
* add support for hash scheduling (#1260)
* feat: Login form and admin update (#1589)

Upgrade react-admin to v5
Implements a login form to use in Pro version

---------

Co-authored-by: Victor Castell <[email protected]>
Co-authored-by: Ivan Kripakov <[email protected]>
Co-authored-by: Filipe Pina <[email protected]>
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.

2 participants