Github user michaelandrepearce commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1744
  
    @shailendra14k just going through the code around the producer credits you 
mentioned (my inquisitiveness got the better of me)
    
    It looks like this is possibly fixed maybe in Clebert's recent changes for 
client compatibility.
    
    See here in ServerSessionImpl the address is being handled by method 
removePrefix
    
    ```
       @Override
       public void requestProducerCredits(SimpleString address, final int 
credits) throws Exception {
          final SimpleString addr = removePrefix(address);
          PagingStore store = server.getPagingManager().getPageStore(addr);
    
          if (!store.checkMemory(new Runnable() {
             @Override
             public void run() {
                callback.sendProducerCreditsMessage(credits, address);
             }
          })) {
             callback.sendProducerCreditsFailMessage(credits, address);
          }
       }
    ```
    
    removePrefix only operates if prefix's are enabled for that session:
    ```
    @Override
       public SimpleString removePrefix(SimpleString address) {
          if (prefixEnabled && address != null) {
             return PrefixUtil.getAddress(address, prefixes);
          }
          return address;
       }
    ```
    
    And then in ActiveMQPacketHandler its setting the prefixes to replace when 
connection version is < addressing change.
    ```
    if (connection.getChannelVersion() < PacketImpl.ADDRESSING_CHANGE_VERSION) {
                routingTypeMap = new HashMap<>();
                routingTypeMap.put(PacketImpl.OLD_QUEUE_PREFIX, 
RoutingType.ANYCAST);
                routingTypeMap.put(PacketImpl.OLD_TOPIC_PREFIX, 
RoutingType.MULTICAST);
             }
    ```
    
    Does your issue occur if you take latest master?
    



---

Reply via email to