Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
MaheshMadushan committed Oct 14, 2022
1 parent deca44d commit 1cf69e2
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

import java.util.HashMap;
import java.util.Map;
import java.util.UUID;


/**
Expand Down Expand Up @@ -206,7 +207,6 @@ public void connect(ConnectionCallback connectionCallback , State state) throws
}

PulsarClient client = null;

try {
client = PulsarClient.builder()
.serviceUrl("pulsar://localhost:6650") // TODO : need c8db stream
Expand All @@ -215,13 +215,13 @@ public void connect(ConnectionCallback connectionCallback , State state) throws
e.printStackTrace();
}

Consumer consumer =
null;
Consumer consumer = null;
UUID uniqueTopicName = UUID.randomUUID();
try {
consumer = client
.newConsumer()
.topic("my-topic") // TODO : topic name should be collection name
.subscriptionName("my-subscription") // TODO : should be an unique name
.subscriptionName(uniqueTopicName.toString()) // TODO : should be an unique name
.subscribe();
} catch (PulsarClientException e) {
e.printStackTrace();
Expand Down

0 comments on commit 1cf69e2

Please sign in to comment.