// 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
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;
   }
//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);
}
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());
}
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;
}