private AMQProducerBrokerExchange getProducerBrokerExchange(ProducerId id) throws IOException {
      AMQProducerBrokerExchange result = producerExchanges.get(id);
      if (result == null) {
         synchronized (producerExchanges) {
            result = new AMQProducerBrokerExchange();
            result.setConnectionContext(context);
            //todo implement reconnect https://issues.apache.org/jira/browse/ARTEMIS-194
            //todo: this used to check for  && this.acceptorUsed.isAuditNetworkProducers()
            if (context.isReconnect() || (context.isNetworkConnection())) {
               // once implemented ARTEMIS-194, we need to set the storedSequenceID here somehow
               // We have different semantics on Artemis Journal, but we could adapt something for this
               // TBD during the implemetnation of ARTEMIS-194
               result.setLastStoredSequenceId(0);
            }
            SessionState ss = state.getSessionState(id.getParentId());
            if (ss != null) {
               result.setProducerState(ss.getProducerState(id));
               ProducerState producerState = ss.getProducerState(id);
               if (producerState != null && producerState.getInfo() != null) {
                  ProducerInfo info = producerState.getInfo();
                  result.setMutable(info.getDestination() == null || info.getDestination().isComposite());
               }
            }
            producerExchanges.put(id, result);
         }
      }
      return result;
   }
private AMQProducerBrokerExchange getProducerBrokerExchange(ProducerId id) throws IOException {
      AMQProducerBrokerExchange result = producerExchanges.get(id);
      if (result == null) {
         synchronized (producerExchanges) {
            result = new AMQProducerBrokerExchange();
            result.setConnectionContext(context);
           
           
            if (context.isReconnect() || (context.isNetworkConnection())) {
              
              
              
               result.setLastStoredSequenceId(0);
            }
            SessionState ss = state.getSessionState(id.getParentId());
            if (ss != null) {
               result.setProducerState(ss.getProducerState(id));
               ProducerState producerState = ss.getProducerState(id);
               if (producerState != null && producerState.getInfo() != null) {
                  ProducerInfo info = producerState.getInfo();
                  result.setMutable(info.getDestination() == null || info.getDestination().isComposite());
               }
            }
            producerExchanges.put(id, result);
         }
      }
      return result;
   }
private amqproducerbrokerexchange getproducerbrokerexchange(producerid id) throws ioexception { amqproducerbrokerexchange result = producerexchanges.get(id); if (result == null) { synchronized (producerexchanges) { result = new amqproducerbrokerexchange(); result.setconnectioncontext(context); if (context.isreconnect() || (context.isnetworkconnection())) { result.setlaststoredsequenceid(0); } sessionstate ss = state.getsessionstate(id.getparentid()); if (ss != null) { result.setproducerstate(ss.getproducerstate(id)); producerstate producerstate = ss.getproducerstate(id); if (producerstate != null && producerstate.getinfo() != null) { producerinfo info = producerstate.getinfo(); result.setmutable(info.getdestination() == null || info.getdestination().iscomposite()); } } producerexchanges.put(id, result); } } return result; }