Skip to content

Instantly share code, notes, and snippets.

@lc-nyovchev
Created December 13, 2018 22:25
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/ee40351a4ce7652701cf6f3f00b2cb6f to your computer and use it in GitHub Desktop.
Save lc-nyovchev/ee40351a4ce7652701cf6f3f00b2cb6f to your computer and use it in GitHub Desktop.
@Service
@RequiredArgsConstructor
public class SomeRouterService {
@NonNull private final DispatcherService dispatcherService;
@Qualifier("someDestination1") @NonNull private final SomeDestination someDestination1;
@Qualifier("someDestination2") @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