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

Add capability to determine topic names #11

Merged
merged 1 commit into from
Aug 15, 2018
Merged

Conversation

bdellegrazie
Copy link
Contributor

Add clientID to the initial connection factory
Use the newer more generic interfaces rather than the queue / topic specific connection factory, session and publisher / subscriber as recommended by the EE documentation.

@@ -12,4 +12,6 @@
long reprocess(final String host, final String port, final String brokerName, final String destinationName, final Iterator<String> msgIds) throws Exception;

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;

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

@cjs-common-platform-ci
Copy link
Member

SonarQube analysis reported 1 issue

  • MAJOR 1 major

Watch the comments in this conversation to review them.

@coveralls
Copy link

coveralls commented Aug 15, 2018

Coverage Status

Coverage increased (+0.5%) to 73.837% when pulling 8dda4db on feature-topic-names into fe53a09 on master.

@@ -91,6 +91,13 @@ public long reprocess(final String host, final String port, final String brokerN
}
}

public String[] topicNames(final String host, final String port, final String brokerName) throws Exception {
try (final JMXConnector connector = getJMXConnector(host, port)) {
JMSServerControl serverControl = serverControlOf(connector, brokerName);
Copy link
Member

Choose a reason for hiding this comment

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

final

@@ -48,11 +52,19 @@ public static void putInQueue(final String queueName, final InputStream messageI
producerOf(queueName).send(message);
}

public static void putOnTopic(final String topicName, final String msgText, final String... origAddress) throws JMSException {
TextMessage message = JMS_SESSION.createTextMessage(msgText);
Copy link
Member

Choose a reason for hiding this comment

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

final

@bdellegrazie bdellegrazie merged commit a0f21dd into master Aug 15, 2018
@bdellegrazie bdellegrazie deleted the feature-topic-names branch August 15, 2018 14:28
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