You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Aidan Skinner (JIRA)" <qp...@incubator.apache.org> on 2009/04/20 12:24:47 UTC

[jira] Created: (QPID-1823) Session creation for more than 64K channelId causes timeout

Session creation for more than 64K channelId causes timeout 
------------------------------------------------------------

                 Key: QPID-1823
                 URL: https://issues.apache.org/jira/browse/QPID-1823
             Project: Qpid
          Issue Type: Bug
          Components: Java Client
    Affects Versions: 0.5
            Reporter: Aidan Skinner
            Assignee: Aidan Skinner
             Fix For: 0.5


Mule connectors create a session for each message send. Once we get beyond 64K this causes a problem since channelId gets converted in AMQFrame.writeUnsignedShort and loops back round to 0. This is a problem since the channelId that the connection is holding does not get reset to the new value. It's also not ideal since channel 0 is the control channel.

So, proposed solution is to:
- check the channelId on session creation to see if greater than the channelMax value
- if greater, then create an array holding a boolean for each index position (i.e. integer) false meaning channelId available and true if in use.
- we can also also reserve channel 0 for control channel
- so, for sessions created after the channel max value is hit then we perform a lookup/add on session creation and a remove on session close
- thus the cost associated is marginal and only introduced after the 64K+1 session is opened

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] Commented: (QPID-1823) Session creation for more than 64K channelId causes timeout

Posted by "Ross Mason (JIRA)" <qp...@incubator.apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-1823?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12701061#action_12701061 ] 

Ross Mason commented on QPID-1823:
----------------------------------

Hi,

Just to clarify, you can tell Mule to cache sessions, Just set the cacheJmsSessions property on the connector:

{code:xml}
<jsm:connector name="test" cacheJmsSessions="true" .../>
{code}

This feature is off by default because it's not part of the JMS spec.

> Session creation for more than 64K channelId causes timeout 
> ------------------------------------------------------------
>
>                 Key: QPID-1823
>                 URL: https://issues.apache.org/jira/browse/QPID-1823
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.5
>            Reporter: Aidan Skinner
>            Assignee: Aidan Skinner
>             Fix For: 0.5
>
>         Attachments: QPID-1823.patch
>
>
> Mule connectors create a session for each message send. Once we get beyond 64K this causes a problem since channelId gets converted in AMQFrame.writeUnsignedShort and loops back round to 0. This is a problem since the channelId that the connection is holding does not get reset to the new value. It's also not ideal since channel 0 is the control channel.
> So, proposed solution is to:
> - check the channelId on session creation to see if greater than the channelMax value
> - if greater, then create an array holding a boolean for each index position (i.e. integer) false meaning channelId available and true if in use.
> - we can also also reserve channel 0 for control channel
> - so, for sessions created after the channel max value is hit then we perform a lookup/add on session creation and a remove on session close
> - thus the cost associated is marginal and only introduced after the 64K+1 session is opened

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] Updated: (QPID-1823) Session creation for more than 64K channelId causes timeout

Posted by "Aidan Skinner (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-1823?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aidan Skinner updated QPID-1823:
--------------------------------

    Attachment:     (was: QPID-1823.patch)

> Session creation for more than 64K channelId causes timeout 
> ------------------------------------------------------------
>
>                 Key: QPID-1823
>                 URL: https://issues.apache.org/jira/browse/QPID-1823
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.5
>            Reporter: Aidan Skinner
>            Assignee: Aidan Skinner
>             Fix For: 0.5
>
>         Attachments: QPID-1823.patch
>
>
> Mule connectors create a session for each message send. Once we get beyond 64K this causes a problem since channelId gets converted in AMQFrame.writeUnsignedShort and loops back round to 0. This is a problem since the channelId that the connection is holding does not get reset to the new value. It's also not ideal since channel 0 is the control channel.
> So, proposed solution is to:
> - check the channelId on session creation to see if greater than the channelMax value
> - if greater, then create an array holding a boolean for each index position (i.e. integer) false meaning channelId available and true if in use.
> - we can also also reserve channel 0 for control channel
> - so, for sessions created after the channel max value is hit then we perform a lookup/add on session creation and a remove on session close
> - thus the cost associated is marginal and only introduced after the 64K+1 session is opened

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] Updated: (QPID-1823) Session creation for more than 64K channelId causes timeout

Posted by "Aidan Skinner (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-1823?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aidan Skinner updated QPID-1823:
--------------------------------

    Status: Ready To Review  (was: In Progress)

> Session creation for more than 64K channelId causes timeout 
> ------------------------------------------------------------
>
>                 Key: QPID-1823
>                 URL: https://issues.apache.org/jira/browse/QPID-1823
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.5
>            Reporter: Aidan Skinner
>            Assignee: Aidan Skinner
>             Fix For: 0.5
>
>         Attachments: QPID-1823.patch
>
>
> Mule connectors create a session for each message send. Once we get beyond 64K this causes a problem since channelId gets converted in AMQFrame.writeUnsignedShort and loops back round to 0. This is a problem since the channelId that the connection is holding does not get reset to the new value. It's also not ideal since channel 0 is the control channel.
> So, proposed solution is to:
> - check the channelId on session creation to see if greater than the channelMax value
> - if greater, then create an array holding a boolean for each index position (i.e. integer) false meaning channelId available and true if in use.
> - we can also also reserve channel 0 for control channel
> - so, for sessions created after the channel max value is hit then we perform a lookup/add on session creation and a remove on session close
> - thus the cost associated is marginal and only introduced after the 64K+1 session is opened

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] Resolved: (QPID-1823) Session creation for more than 64K channelId causes timeout

Posted by "Aidan Skinner (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-1823?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aidan Skinner resolved QPID-1823.
---------------------------------

    Resolution: Fixed

> Session creation for more than 64K channelId causes timeout 
> ------------------------------------------------------------
>
>                 Key: QPID-1823
>                 URL: https://issues.apache.org/jira/browse/QPID-1823
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.5
>            Reporter: Aidan Skinner
>            Assignee: Aidan Skinner
>             Fix For: 0.5
>
>         Attachments: QPID-1823.patch
>
>
> Mule connectors create a session for each message send. Once we get beyond 64K this causes a problem since channelId gets converted in AMQFrame.writeUnsignedShort and loops back round to 0. This is a problem since the channelId that the connection is holding does not get reset to the new value. It's also not ideal since channel 0 is the control channel.
> So, proposed solution is to:
> - check the channelId on session creation to see if greater than the channelMax value
> - if greater, then create an array holding a boolean for each index position (i.e. integer) false meaning channelId available and true if in use.
> - we can also also reserve channel 0 for control channel
> - so, for sessions created after the channel max value is hit then we perform a lookup/add on session creation and a remove on session close
> - thus the cost associated is marginal and only introduced after the 64K+1 session is opened

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] Updated: (QPID-1823) Session creation for more than 64K channelId causes timeout

Posted by "Aidan Skinner (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-1823?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aidan Skinner updated QPID-1823:
--------------------------------

    Attachment: QPID-1823.patch

patch, please review

> Session creation for more than 64K channelId causes timeout 
> ------------------------------------------------------------
>
>                 Key: QPID-1823
>                 URL: https://issues.apache.org/jira/browse/QPID-1823
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.5
>            Reporter: Aidan Skinner
>            Assignee: Aidan Skinner
>             Fix For: 0.5
>
>         Attachments: QPID-1823.patch
>
>
> Mule connectors create a session for each message send. Once we get beyond 64K this causes a problem since channelId gets converted in AMQFrame.writeUnsignedShort and loops back round to 0. This is a problem since the channelId that the connection is holding does not get reset to the new value. It's also not ideal since channel 0 is the control channel.
> So, proposed solution is to:
> - check the channelId on session creation to see if greater than the channelMax value
> - if greater, then create an array holding a boolean for each index position (i.e. integer) false meaning channelId available and true if in use.
> - we can also also reserve channel 0 for control channel
> - so, for sessions created after the channel max value is hit then we perform a lookup/add on session creation and a remove on session close
> - thus the cost associated is marginal and only introduced after the 64K+1 session is opened

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] Updated: (QPID-1823) Session creation for more than 64K channelId causes timeout

Posted by "Aidan Skinner (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-1823?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aidan Skinner updated QPID-1823:
--------------------------------

    Attachment: QPID-1823.patch

Revised patch with criticism from Martin

> Session creation for more than 64K channelId causes timeout 
> ------------------------------------------------------------
>
>                 Key: QPID-1823
>                 URL: https://issues.apache.org/jira/browse/QPID-1823
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.5
>            Reporter: Aidan Skinner
>            Assignee: Aidan Skinner
>             Fix For: 0.5
>
>         Attachments: QPID-1823.patch
>
>
> Mule connectors create a session for each message send. Once we get beyond 64K this causes a problem since channelId gets converted in AMQFrame.writeUnsignedShort and loops back round to 0. This is a problem since the channelId that the connection is holding does not get reset to the new value. It's also not ideal since channel 0 is the control channel.
> So, proposed solution is to:
> - check the channelId on session creation to see if greater than the channelMax value
> - if greater, then create an array holding a boolean for each index position (i.e. integer) false meaning channelId available and true if in use.
> - we can also also reserve channel 0 for control channel
> - so, for sessions created after the channel max value is hit then we perform a lookup/add on session creation and a remove on session close
> - thus the cost associated is marginal and only introduced after the 64K+1 session is opened

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org