Can some one provide me java sample to Replay Topic Endpoint ?
Take a look at our Java Replay tutorial here: https://solace.com/samples/solace-samples-java/feature_message-replay/
It replays to a queue, but replaying to a topic is very similar.
You should be able to just pull out the queue specific stuff and replace with a TopicEndpoint that's subscribed to a topic.
So remove this...
Queue queue = JCSMPFactory.onlyInstance().createQueue(queueName);
Replace with this as an example
TopicEndpoint topicEndpoint = JCSMPFactory.onlyInstance().createDurableTopicEndpointEx(topicName);
Topic topicSub = JCSMPFactory.onlyInstance().createTopic("ATTENDEE/tweets/stream");
Hope that helps!
As a side note, we usually recommend that clients use queue endpoints instead of topic endpoints as they are more flexible.
Topic endpoints allow you to specify an inbound message selector, but if you aren't using that feature then going with a queue endpoint will allow for your endpoint to have multiple topic subscriptions, choose exclusive vs. non-exclusive to provide, etc. You can read more the endpoints in the docs here: https://docs.solace.com/PubSub-Basics/Endpoints.htm
It is helpful Thanks Marc!!