[ISSUE #4390] Realize the SPI extension loading of RabbitMQ admin-api#4395
[ISSUE #4390] Realize the SPI extension loading of RabbitMQ admin-api#4395mxsm merged 7 commits intoapache:masterfrom
Conversation
This reverts commit a835cbf.
Codecov Report
@@ Coverage Diff @@
## master #4395 +/- ##
============================================
- Coverage 17.85% 17.82% -0.03%
Complexity 1514 1514
============================================
Files 602 604 +2
Lines 25518 25550 +32
Branches 2400 2400
============================================
Hits 4555 4555
- Misses 20524 20556 +32
Partials 439 439
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
| rabbitmqctl add_user full_access s3crEt | ||
| # tag the user with "administrator" for full management UI and HTTP API access | ||
| rabbitmqctl set_user_tags full_access administrator | ||
| ``` |
There was a problem hiding this comment.
These are all provided by RabbitMQ. I would like to know the relationship between these and eventmesh-dashboard.
pandaapo
left a comment
There was a problem hiding this comment.
I noticed that the implementation of admin is all empty, so this PR is an initialization work, right?
| public List<TopicProperties> getTopic() { | ||
| // Utilizing the RabbitMQ Management HTTP API is a favorable approach to list queues and historical message counts. | ||
| // To display topics, it would be necessary to retrieve the topic name from each message and use it to declare a corresponding queue. | ||
| return new ArrayList<>(); |
There was a problem hiding this comment.
What do these two lines of comments mean? Are they expressing "TODO" or are they expressing "Please use RabbitMQ's management features"?
There was a problem hiding this comment.
It is an instruction for future development, indicating that using RabbitMQ HTTP API provided by rabbitmq_management webui is the best way to implement this admin function.
The reason that why I didn't implement this is because that the admin function is limited by storage-plugin and the original author is currently unreachable. I will come back after other storage-plugins' admin functions are done.
There was a problem hiding this comment.
So these comments are expressing "TODO", right?
…in-api (apache#4395) * config: rabbitmq spi without webhook, RESTORE BEFORE MERGE * config: add extensionType in META-INF * fix: resolve extension not found error when startup * feat: add rabbitmq management config * feat: provide limited admin func * Revert "config: rabbitmq spi without webhook, RESTORE BEFORE MERGE" This reverts commit 05daccb. * doc: add PR link to README
Fixes #4390.
Motivation
StartUp failure when using RabbitMQ as storage-plugin.
Modifications
Realize the RabbitMQ admin-api to fulfuill SPI extension loading.
Admin functions?
Based on the current implementation of org.apache.eventmesh.storage.rabbitmq.producer.RabbitmqProducer, it is not possible to display message counts per topic.
RabbitMQ itself does not retain consumed messages or record topic names; it can only list exchanges and queues. The existing exchanges and queues are both singular and fixed.
To display topics, it would be necessary to retrieve the topic name from each message and use it to declare a corresponding queue. However, this approach would incur additional overhead when receiving new topics.
While elevating the topic concept to a queue could address the issue of "being able to track historical message counts for queues but not for topics," this approach aligns with the design philosophy of exchanges with TOPIC type. However, considering the current limited demand within the community, I plan to address startup errors and provide only limited management functionalities for now.
Upon investigation, it appears that utilizing the RabbitMQ Management HTTP API is a favorable approach to list queues and historical message counts.
Relevant Bug
#4394
Documentation