public void addSubscription(String subscriptionChannel,int streamId,FragmentHandler fragmentHandler){
  if (!hasSubscriptionForChannel(subscriptionChannel)) {
    debug("Creating a subscriptions to channel => {}",subscriptionChannel);
    Subscription subscription=aeron.addSubscription(subscriptionChannel,streamId);
    debug("Subscription created channel => {} ",subscriptionChannel);
    SubscriptionGroup subscriptionGroup=new SubscriptionGroup(subscriptionChannel,subscription,fragmentHandler);
    subscriptionGroups.add(subscriptionGroup);
    debug("Subscriptions created to channel => {}",subscriptionChannel);
  }
 else {
    debug("Subscription already exists for channel => {}",subscriptionChannel);
  }
}

public void addSubscription ( String subscriptionChannel , int streamId , FragmentHandler fragmentHandler ) { if ( ! hasSubscriptionForChannel ( subscriptionChannel ) ) { debug ( "Creating a subscriptions to channel => {}" , subscriptionChannel ) ; Subscription subscription = aeron . addSubscription ( subscriptionChannel , streamId ) ; debug ( "Subscription created channel => {} " , subscriptionChannel ) ; SubscriptionGroup subscriptionGroup = new SubscriptionGroup ( subscriptionChannel , subscription , fragmentHandler ) ; subscriptionGroups . add ( subscriptionGroup ) ; debug ( "Subscriptions created to channel => {}" , subscriptionChannel ) ; } else { debug ( "Subscription already exists for channel => {}" , subscriptionChannel ) ; } }
adds an aeron subscription to be polled . this method will create a subscription for each of the polling threads .
