Skip to content

Commit

Permalink
bean
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Mautsch committed Jul 5, 2024
1 parent ef331f2 commit 8463d78
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,19 @@ public class NatsCalendarConsumer {
private static final String CONSUMER_NAME = "Calendar";


/*
public NatsCalendarConsumer(ConsumerUtil consumerUtil) {
consumerUtil.subscribe(CONSUMER_NAME, "patient.*",
(msg, eventData) -> process(msg.getSubject(), eventData));
consumerUtil.subscribe(CONSUMER_NAME, "practitioner.*",
(msg, eventData) -> process(msg.getSubject(), eventData));
}
*/

private void process(String key, EventData eventData) {
@NatsListener(consumerName = CONSUMER_NAME, subject = "patient.*")
//@NatsListener(consumerName = CONSUMER_NAME, subject = "patient.*")
public void process(String key, EventData eventData) {
switch (key) {
case "patient.create" -> createPatient(eventData.referenceId());
case "patient.update" -> updatePatient(eventData.referenceId());
Expand Down

0 comments on commit 8463d78

Please sign in to comment.