Conversation
|
|
Any idea why sonarcloud does not seem to analyze the code? |
iluwatar
left a comment
There was a problem hiding this comment.
Please see the review comments. Additionally:
- Check spelling of the folder (publish-subsribe -> publish-subscribe)
- Add the module to the parent pom.xml. Otherwise, CI does not even build it.
| /** | ||
| * Main application demonstrating different aspects of JMS publish-subscribe pattern. | ||
| */ |
There was a problem hiding this comment.
Describe the pattern and explain how this example implements it
| demonstrateSharedSubscriptions(); | ||
| } catch (Exception e) { | ||
| System.err.println("Error in publish-subscribe demo: " + e.getMessage()); | ||
| e.printStackTrace(); |
| } finally { | ||
| cleanup(null); | ||
| } | ||
| JmsUtil.closeConnection(); |
There was a problem hiding this comment.
Should this be inside the finally block?
|
|
||
| try { | ||
| // Create basic subscribers | ||
| subscribers.add(new TopicSubscriber("BasicSub1", "NEWS", SubscriberType.NONDURABLE, null)); |
There was a problem hiding this comment.
Use constants for strings like this
| public String getContent() { | ||
| return content; | ||
| } | ||
|
|
||
| public String getTopic() { | ||
| return topic; | ||
| } |
There was a problem hiding this comment.
Use Lombok to get rid of boilerplate
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <Configuration status="INFO"> | ||
| <Appenders> | ||
| <Console name="Console" target="SYSTEM_OUT"> | ||
| <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/> | ||
| </Console> | ||
| </Appenders> | ||
| <Loggers> | ||
| <Root level="info"> | ||
| <AppenderRef ref="Console"/> | ||
| </Root> | ||
| <!-- Reduce ActiveMQ logging --> | ||
| <Logger name="org.apache.activemq" level="warn" additivity="false"> | ||
| <AppenderRef ref="Console"/> | ||
| </Logger> | ||
| </Loggers> | ||
| </Configuration> |
There was a problem hiding this comment.
You can use Lombok's logger instead
|
This PR is stale because it has been open 60 days with no activity. |
|
Closed due to inactivity. Thank you for the contribution. |



Implementation of the Publish/Subscribe design pattern using JMS
Close #2898