Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8529865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:07:35+00:00 2026-06-11T09:07:35+00:00

I have issues when I try to unsubscribe from a pubsub node. I am

  • 0

I have issues when I try to unsubscribe from a pubsub node.

I am writting a BOSH client in js.

This is how I subscribe (with a full JID) :

<body rid='1023502710' xmlns='http://jabber.org/protocol/httpbind' sid='2ded0255fc6e8bf912a2871d415173faadecfea6'>
<presence xmlns='jabber:client'/>
<presence from='sav1@my.server.com/my_resource' to='amd.my.server.com/sav' xmlns='jabber:client'/>
<iq to='pubsub.my.server.com' type='set' xmlns='jabber:client' id='5007:sendIQ'>
    <pubsub xmlns='http://jabber.org/protocol/pubsub'>
        <subscribe node='/home/monitoring/sav' jid='sav1@my.server.com/my_resource'/>
    </pubsub>
</iq>
</body>

On my next bind request, I receive the following stanza (because I’ve subscribe with a node attribute) :

http://xmpp.org/extensions/xep-0060.html#example-24 : An entity MAY also request all of its subscriptions at a specific node (e.g., if it has subscriptions with multiple SubIDs) by including a ‘node’ attribute on the element.

<body xmlns='http://jabber.org/protocol/httpbind'>
<message xmlns='jabber:client' from='pubsub.my.server.com' to='sav1@my.server.com/my_resource'>
    <event xmlns='http://jabber.org/protocol/pubsub#event'>
        <items node='/home/monitoring/sav'>
            <item id='monitor'>
                <!-- some pubsub information -->
            </item>
        </items>
    </event>
    <delay xmlns='urn:xmpp:delay' from='amd.my.server.com' stamp='2012-09-14T12:36:28Z'/>
</message>
<iq xmlns='jabber:client' from='pubsub.my.server.com' to='sav1@my.server.com/my_resource' id='5007:sendIQ' type='result'>
    <pubsub xmlns='http://jabber.org/protocol/pubsub'>
        <subscription jid='sav1@my.server.com/my_resource' subscription='subscribed' subid='543990DD8E6E6' node='/home/monitoring/sav'/>
    </pubsub>
</iq>
<message xmlns='jabber:client' from='pubsub.my.server.com' to='sav1@my.server.com/my_resource' type='headline'>
    <event xmlns='http://jabber.org/protocol/pubsub#event'>
        <items node='/home/monitoring/sav'>
            <item id='monitor'>
                <!-- some pubsub information -->
            </item>
        </items>
    </event>
    <headers xmlns='http://jabber.org/protocol/shim'>
        <header name='Collection'>/home/monitoring/sav</header>
        <header name='SubID'>5435B7F0CA392</header>
        <!-- a lot of other SubIDs -->
    </headers>
</message>
</body>

In the headers section, I receive a lot of SubID. I suppose the reason for this is bad unsubscribe.

When I end my session, I unsubsribe from every SubID :

<body rid='1023502724' xmlns='http://jabber.org/protocol/httpbind' sid='2ded0255fc6e8bf912a2871d415173faadecfea6'>
<iq to='pubsub.my.server.com' type='set' xmlns='jabber:client' id='5008:sendIQ'>
    <pubsub xmlns='http://jabber.org/protocol/pubsub'>
        <unsubscribe node='/home/monitoring/sav' jid='sav1@my.server.com' subid='5435B7F0CA392'/>
    </pubsub>
</iq>
<!-- a lot of other unsubscribed iqs -->
</body>

The answer is immediate :

<body xmlns='http://jabber.org/protocol/httpbind'>
<iq xmlns='jabber:client' from='pubsub.my.server.com' to='sav1@my.server.com/my_resource' type='error' id='5008:sendIQ'>
    <pubsub xmlns='http://jabber.org/protocol/pubsub'>
        <unsubscribe node='/home/monitoring/sav' jid='sav1@my.server.com' subid='5435B7F0CA392'/>
    </pubsub>
    <error code='401' type='cancel'>
        <unexpected-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
        <not-subscribed xmlns='http://jabber.org/protocol/pubsub#errors'/>
    </error>
</iq>
</body>

No other SubID is mentionned except the first I initially received.

What am I doing wrong ?

I am running ejabberd 2.1.10.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T09:07:36+00:00Added an answer on June 11, 2026 at 9:07 am

    I don’t think the resource should be passed with the jid on a subscribe. I don’t know if that is just something left in the example, but that may be messing things up.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using itextsharp to populate my PDFs. I have no issues with this.
I try to build my first Facebook application and I have some issues. I
Have some issues with passing large amount of data (3 MB) from uboot to
I have been running through alot of issues try to pause and unpause a
I currently have issues in Webkit(Safari and Chrome) were I try to load dynamically
I try to migrate to GCM and I have an issue with the SENDER_ID
I have a problem and I will try to explain the issue: I have
I have a fun issue where during application shutdown, try / catch blocks are
I have a very specific SSL issue on my Android. If I try to
I have issues with Firefox and keydown function. It will not trigger the function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.