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

Queue and Topic depths #14

Merged
merged 1 commit into from
Aug 20, 2018
Merged

Queue and Topic depths #14

merged 1 commit into from
Aug 20, 2018

Conversation

bdellegrazie
Copy link
Contributor

Provide commands to get the messageCount of all queues and topics

try {
return processQueueControl(connector, brokerName, destination, fn);
} catch (Exception e) {
throw new RuntimeException(e);

Choose a reason for hiding this comment

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

MAJOR Define and throw a dedicated exception instead of using a generic one. rule

try {
return processTopicControl(connector, brokerName, destination, fn);
} catch (Exception e) {
throw new RuntimeException(e);

Choose a reason for hiding this comment

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

MAJOR Define and throw a dedicated exception instead of using a generic one. rule

@coveralls
Copy link

coveralls commented Aug 20, 2018

Coverage Status

Coverage decreased (-1.01%) to 82.511% when pulling b64c639 on queue-depths into 074e13e on master.

@@ -14,4 +15,8 @@
String[] queueNames(final String host, final String port, final String brokerName) throws Exception;

String[] topicNames(final String host, final String port, final String brokerName) throws Exception;

Map<String, Long> queueMessageCount(final String host, final String port, final String brokerName, final String[] queueNames) throws Exception;

Choose a reason for hiding this comment

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

MAJOR Define and throw a dedicated exception instead of using a generic one. rule


Map<String, Long> queueMessageCount(final String host, final String port, final String brokerName, final String[] queueNames) throws Exception;

Map<String, Long> topicMessageCount(final String host, final String port, final String brokerName, final String[] topicNames) throws Exception;

Choose a reason for hiding this comment

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

MAJOR Define and throw a dedicated exception instead of using a generic one. rule

map.entrySet().stream().sorted(Map.Entry.comparingByKey()).forEach(
entry -> arrayBuilder.add(this.toJsonObject(entry, valueName))
);
System.out.println(arrayBuilder.build().toString());

Choose a reason for hiding this comment

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

MAJOR Replace this use of System.out or System.err by a logger. rule

@cjs-common-platform-ci
Copy link
Member

SonarQube analysis reported 5 issues

  • MAJOR 5 major

Watch the comments in this conversation to review them.

- Use the generic functional interface for server control
- Correct the connection startup / teardown process
- Tests for messageCounts for queues and topics
@mapingo mapingo merged commit d32d7e1 into master Aug 20, 2018
@mapingo mapingo deleted the queue-depths branch August 20, 2018 14:25
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

4 participants