feat: Added subscribeTopic method to TopicClient#194
feat: Added subscribeTopic method to TopicClient#194manishdait wants to merge 9 commits intoOpenElements:mainfrom
Conversation
Signed-off-by: Manish Dait <daitmanish88@gmail.com>
Signed-off-by: Manish Dait <daitmanish88@gmail.com>
Signed-off-by: Manish Dait <daitmanish88@gmail.com>
Signed-off-by: Manish Dait <daitmanish88@gmail.com>
Signed-off-by: Manish Dait <daitmanish88@gmail.com>
There was a problem hiding this comment.
Pull Request Overview
This PR adds subscription functionality to the TopicClient interface, allowing users to subscribe to Hedera topics and listen for incoming messages. The implementation supports various subscription patterns including unlimited subscriptions, limited message counts, and time-bounded subscriptions.
- Introduces
subscribeTopic()method with four overloaded variants for different subscription scenarios - Adds
getConsensusServiceAddress()to NetworkSettings to provide gRPC endpoints for mirror node connectivity - Updates configuration classes to support the new consensus service address field
Reviewed Changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| TopicClient.java | Added four overloaded subscribeTopic methods to the interface |
| TopicClientImpl.java | Implemented subscription methods with parameter validation |
| NetworkSettings.java | Added getConsensusServiceAddress method to interface |
| HieroConfig.java | Added consensus service address support and updated client creation |
| HieroContext.java | Added getMirrorNodeEndPoint method |
| TopicMessageRequest.java | Added factory methods for different subscription parameter combinations |
| TopicMessageResult.java | Updated to include SubscriptionHandle |
| ProtocolLayerClientImpl.java | Updated to return subscription handle from query execution |
hiero-enterprise-test/src/main/java/com/openelements/hiero/test/SoloActionNetworkSettings.java
Outdated
Show resolved
Hide resolved
...-enterprise-base/src/test/java/com/openelements/hiero/base/test/config/HieroTestContext.java
Outdated
Show resolved
Hide resolved
...-enterprise-base/src/test/java/com/openelements/hiero/base/test/config/HieroTestContext.java
Outdated
Show resolved
Hide resolved
...-enterprise-base/src/test/java/com/openelements/hiero/base/test/config/HieroTestContext.java
Outdated
Show resolved
Hide resolved
hiero-enterprise-spring/src/test/java/com/openelements/hiero/spring/test/TopicClientTest.java
Outdated
Show resolved
Hide resolved
hiero-enterprise-base/src/test/java/com/openelements/hiero/base/test/TopicClientImplTest.java
Outdated
Show resolved
Hide resolved
hiero-enterprise-base/src/test/java/com/openelements/hiero/base/test/TopicClientImplTest.java
Outdated
Show resolved
Hide resolved
...nterprise-base/src/main/java/com/openelements/hiero/base/implementation/TopicClientImpl.java
Outdated
Show resolved
Hide resolved
...nterprise-base/src/main/java/com/openelements/hiero/base/implementation/TopicClientImpl.java
Outdated
Show resolved
Hide resolved
...rprise-base/src/main/java/com/openelements/hiero/base/protocol/data/TopicMessageRequest.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Manish Dait <daitmanish88@gmail.com>
|
@manishdait Could you investigate the cause of the build failure? It doesn't appear to be test-related. And tests were fixed so they should pass |
Signed-off-by: Manish Dait <daitmanish88@gmail.com>
Signed-off-by: Manish Dait <daitmanish88@gmail.com>
I have added the missing methodS to |
This PR introduces
subscribeTopic()method to theTopicClientinterface, which help to subscribe and listen to the messages received by the specific Hedera Topic.Key Changes:
getConsensusServiceAddresstoNetworkSettingsto store the HCS gRPC API inorder to set themirrorNodeAddressinClientbecause is becauseTopicMessageQueryuses the gRPC protocol.Method Added:
Closes: #193