Skip to content

Commit

Permalink
Create overloads for deadlettertopic.
Browse files Browse the repository at this point in the history
Signed-off-by: Artur Souza <asouza.pro@gmail.com>
  • Loading branch information
artursouza committed May 5, 2023
1 parent a752adf commit 60cdd9e
Showing 1 changed file with 47 additions and 27 deletions.
74 changes: 47 additions & 27 deletions sdk-springboot/src/main/java/io/dapr/springboot/DaprRuntime.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,43 @@ public static DaprRuntime getInstance() {
/**
* Adds a topic to the list of subscribed topics.
*
* @param pubSubName PubSub name to subscribe to.
* @param topicName Name of the topic being subscribed to.
* @param match Match expression for this route.
* @param priority Priority for this match relative to others.
* @param route Destination route for requests.
* @param metadata Metadata for extended subscription functionality.
* @param pubSubName PubSub name to subscribe to.
* @param topicName Name of the topic being subscribed to.
* @param match Match expression for this route.
* @param priority Priority for this match relative to others.
* @param route Destination route for requests.
* @param metadata Metadata for extended subscription functionality.
*/
public synchronized void addSubscribedTopic(String pubSubName,
String topicName,
String match,
int priority,
String route,
Map<String, String> metadata) {
this.addSubscribedTopic(pubSubName, topicName, match, priority, route, "",
metadata);
String topicName,
String match,
int priority,
String route,
Map<String, String> metadata) {
this.addSubscribedTopic(pubSubName, topicName, match, priority, route, metadata, null);
}

/**
* Adds a topic to the list of subscribed topics.
*
* @param pubSubName PubSub name to subscribe to.
* @param topicName Name of the topic being subscribed to.
* @param match Match expression for this route.
* @param priority Priority for this match relative to others.
* @param route Destination route for requests.
* @param metadata Metadata for extended subscription functionality.
* @param bulkSubscribe Bulk subscribe configuration.
*/
public synchronized void addSubscribedTopic(String pubSubName,
String topicName,
String match,
int priority,
String route,
Map<String, String> metadata,
DaprTopicBulkSubscribe bulkSubscribe) {
this.addSubscribedTopic(pubSubName, topicName, match, priority, route, null,
metadata, bulkSubscribe);
}

/**
* Adds a topic to the list of subscribed topics.
Expand All @@ -86,16 +106,16 @@ public synchronized void addSubscribedTopic(String pubSubName,
* @param match Match expression for this route.
* @param priority Priority for this match relative to others.
* @param route Destination route for requests.
* @param deadLetterTopic Name of topic to forward undeliverable messages.
* @param deadLetterTopic Name of topic to forward undeliverable messages.
* @param metadata Metadata for extended subscription functionality.
*/
public synchronized void addSubscribedTopic(String pubSubName,
String topicName,
String match,
int priority,
String route,
String deadLetterTopic,
Map<String, String> metadata) {
String topicName,
String match,
int priority,
String route,
String deadLetterTopic,
Map<String, String> metadata) {
this.addSubscribedTopic(pubSubName, topicName, match, priority, route, deadLetterTopic,
metadata, null);
}
Expand All @@ -113,13 +133,13 @@ public synchronized void addSubscribedTopic(String pubSubName,
* @param bulkSubscribe Bulk subscribe configuration.
*/
public synchronized void addSubscribedTopic(String pubSubName,
String topicName,
String match,
int priority,
String route,
String deadLetterTopic,
Map<String, String> metadata,
DaprTopicBulkSubscribe bulkSubscribe) {
String topicName,
String match,
int priority,
String route,
String deadLetterTopic,
Map<String, String> metadata,
DaprTopicBulkSubscribe bulkSubscribe) {
DaprTopicKey topicKey = new DaprTopicKey(pubSubName, topicName);

DaprSubscriptionBuilder builder = subscriptionBuilders.get(topicKey);
Expand Down

0 comments on commit 60cdd9e

Please sign in to comment.