hedera-hcs-sxc-java
hedera-hcs-sxc-java copied to clipboard
Reuse mq connection when established instead of creating new connections
Detailed Description
A clear and concise description of what the bug is. When app.java creates listener twice then mq fails to initialize the second listener https://github.com/hashgraph/hedera-hcs-sxc/blob/d2dd8ec94e10213b59f52cb8bcabadd6476c6b55/hcs-lib/src/main/java/com/hedera/hcslib/callback/OnHCSMessageCallback.java#L35
Actual Behavior Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
Expected Behavior
Environment:
- Java: [e.g. OpenJDK 11.0.4]
- Node: [e.g. v12.9.1-x86]
- OS: [e.g. Ubuntu 18.04]
- Version: [e.g. 1.0.1]
Additional Context Add any other context about the problem here. Attach any logs here, if applicable.
Maybe the connection to MQ should be established when the lib is first instantiated (in the constructor) rather than every time the app subscribes to a topic.