Skip to content
This repository has been archived by the owner on Apr 21, 2019. It is now read-only.

Java nats library. Minor logging changes #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions java/src/main/java/com/deluxe/one/nats/NatsStreamSubject.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ protected void subscribe() {

// Create subject/queue subscription if the queue has been provided
if (StringUtils.isNotEmpty(queue)) {
logger.info("No subscription. Creating a queue subscription. subject={}, queue={}", subject, queue);
logger.info(String.format("No subscription. Creating a queue subscription. subject=%s, queue=%s", subject, queue));
subs = conn.subscribe(subject, queue,
msg -> onMessage(msg.getSubject(), msg.getData()),
subscriptionOptions);
} else {
logger.info("No subscription. Creating a pub/sub subscription. subject={}", subject);
logger.info(String.format("No subscription. Creating a pub/sub subscription. subject=%s", subject));
subs = conn.subscribe(subject,
msg -> onMessage(msg.getSubject(), msg.getData()),
subscriptionOptions);
Expand Down
4 changes: 2 additions & 2 deletions java/src/main/java/com/deluxe/one/nats/NatsSubject.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ protected void subscribe() {

// Create subject/queue subscription if the queue has been provided
if (StringUtils.isNotEmpty(queue)) {
logger.info("No subscription. Creating a queue subscription. subject={}, queue={}", subject, queue);
logger.info(String.format("No subscription. Creating a queue subscription. subject=%s, queue=%s", subject, queue));
subs = conn.subscribe(subject, queue, msg -> onMessage(msg.getSubject(), msg.getData()));
} else {
logger.info("No subscription. Creating a pub/sub subscription. subject={}", subject);
logger.info(String.format("No subscription. Creating a pub/sub subscription. subject=%s", subject));
subs = conn.subscribe(subject, msg -> onMessage(msg.getSubject(), msg.getData()));
}
} catch (Exception ex) {
Expand Down