Skip to content

Instantly share code, notes, and snippets.

@lc-nyovchev
Created December 13, 2018 22:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lc-nyovchev/7a74e7e218aebb6cd62c30f8646e0c12 to your computer and use it in GitHub Desktop.
Save lc-nyovchev/7a74e7e218aebb6cd62c30f8646e0c12 to your computer and use it in GitHub Desktop.
@Service
@RequiredArgsConstructor
public class SomeRouterService {
@NonNull private final DispatcherService dispatcherService;
@NonNull private final SomeDestination someDestination1;
@NonNull private final SomeDestination someDestination2;
public void onMessage(Message message) {
//..some code to route stuff based on something to either destination1 or destination2
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment