Bug 1094177 - Session detach is not detected by the client application
Summary: Session detach is not detected by the client application
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: python-qpid
Version: 2.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: messaging-bugs
QA Contact: MRG Quality Engineering
URL:
Whiteboard:
Depends On: 1093019 1187636
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-05 08:55 UTC by Petr Matousek
Modified: 2025-02-10 03:35 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1093019
Environment:
Last Closed: 2025-02-10 03:35:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Petr Matousek 2014-05-05 08:55:16 UTC
+++ This bug was initially created as a clone of Bug #1093019 +++

Description of problem:

The session detach is not detected by the client application. An exception shall be thrown when the session is detached by peer. The application is naturally not able to send/receive messages after the session was detached. 

Version-Release number of selected component (if applicable):
qpid-cpp-*-0.22-38

How reproducible:
100%

Steps to Reproduce:
1. drain -f amq.direct
2. detach the session used by the drain (ie. using qpid-tool)
   qpid-tool> call <session_id> detach
3. the drain program does not exit, but it's unable to receive messages anymore

Actual results:
The session detach is not detected.

Expected results:
The drain program exits with an exception ie: 'not-attached/Session ended by peer'

Additional info:

# ./drain -f amq.direct
# ./spout amq.direct
Message(properties={u'spout-id': u'0e97cb4e-8230-446c-a5c5-b48790e98fab:0'}, content_type=u'text/plain')
<OK - message received by the drain application>

# qpid-tool
Management Tool for QPID
qpid: list session
Object Summary:
    ID   Created   Destroyed  Index
    =========================================================================
    134  12:24:08  -          145.97aa9eaf-14dc-4f13-97e5-74d8f571765d:0
    135  12:25:57  -          145.dhcp-lab-110.englab.brq.redhat.com.3780.1
qpid: call 134 detach
qpid: OK (0) - {}
qpid: quit
Exiting...

<the drain program is still running>

# ./spout amq.direct
<Message not received by the drain application>

---

C++ 0-10 client:

# drain -f amq.direct
Error: not-attached: Session anonymous.3c8acd3b-9f55-4fa0-b89c-862df621361a isn't attached (/builddir/build/BUILD/qpid-0.22/cpp/src/qpid/client/SessionImpl.cpp:673)
terminate called after throwing an instance of 'qpid::messaging::MessagingException'

C++ 1.0 client:

# ./drain -f --connection-options "{protocol:'amqp1.0'}" amq.direct
Error: Session ended by peer

---

-> Cloned for 2.x

Comment 1 Red Hat Bugzilla 2025-02-10 03:35:46 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.


Note You need to log in before you can comment on or make changes to this bug.