protected void subscribe ( String id , MessagingContext ctx ) throws IOException { if ( ! canProceed ( ) ) return ; Set < MessagingContext > sub = this . routingContext . subscriptions . get ( id ) ; if ( sub == null ) { sub = new HashSet <> ( ) ; this . routingContext . subscriptions . put ( id , sub ) ; } sub . add ( ctx ) ; }
Registers a subscription between an ID and a context .