-
Notifications
You must be signed in to change notification settings - Fork 897
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
Add kafka as an option for prototype.queue_type #19984
Conversation
54a7579
to
b7b0fa8
Compare
cc @carbonin |
app/models/miq_queue.rb
Outdated
:Kafka | ||
end | ||
end | ||
private_class_method :messaging_client_protocol |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, I feel like this should be pushed down into manageiq-messaging... feels like something the caller shouldn't have to know about.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I agree
a7db1ee
to
951dfcd
Compare
So when I have this use YAML, manageiq-messaging fails on YAML.safe_load:
And when I use the JSON encoding the payload that ManageIQ::Messaging yields to the block is nil
Going to mark this WIP until this is figured out, or we could yield the JSON messages to the topic and publish to MiqQueue which is what we're planning on for metrics and allow kafka as an MIQ Queue replacement in a future PR @Fryguy |
Yeah the symbol keys were what I was concerned about. |
23c694c
to
d895578
Compare
Okay instead of a queue replacement this will now publish events to kafka/artemis if available in a json format in addition to the normal event handling over MiqQueue. This should make it easier for other services to consume events (json format not yaml w/ symbols) and when we want to move to kafka as a queue replacement we can update the event handler to deal with json payloads |
57dfefb
to
18bd565
Compare
FYI, in case this was a surprise or worked previously... it could be due to #19701 because we weren't honoring I agree, using string keys or json is probably best. |
Currently we have two queue_types, miq_queue and artemis with the later allowing the use of ManageIQ::Messaging client. ManageIQ::Messaging also has support for kafka which we can also allow to be used here.
18bd565
to
cf48c7e
Compare
Checked commits agrare/manageiq@f724ebe~...cf48c7e with ruby 2.5.7, rubocop 0.69.0, haml-lint 0.28.0, and yamllint |
Add kafka as an option for prototype.queue_type (cherry picked from commit beea070)
Jansa backport details:
|
Currently we have two queue_types, miq_queue and artemis with the latter allowing the use of ManageIQ::Messaging client.
ManageIQ::Messaging also has support for kafka which we can also allow to be used here.