Last active
April 24, 2017 12:15
-
-
Save ndemengel/df2a6e280f4710a9277bc9d82c474f55 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Value | |
public class EmailUpdated implements Event { | |
public static final String EXCHANGE_NAME = "email.updated.exchange"; | |
String accountId; | |
String oldEmail; | |
String newEmail; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eventsService.fire(new EmailUpdated(accountId, oldEmail, newEmail)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RabbitEventListener(queue = "some.queue") | |
public void emailUpdated(EmailUpdated event) { | |
doSomethingWith(event.getOldEmail(), event.getNewEmail()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment