Publishing Duplicate item on pubsub node

Hello there

I have been using Openfire since three weeks and it is working great as per our expectation, however only problem that I had encountered is openfire pubsub node publishing item twice even when it is already been delivered. When I close the connection and make log in again, it published the last published item which is already been delivered. I am wondering, is it a bug of recent openfire version?

Thanks

Lakpa Dindu

This is normal behaviour. According to the specification, the last published item may be published to a new subscriber. Thus if you log in and subscribe again, the last published item will get published to you.

Thanks for your prompt response. I wonder, are there any way to stop publishing item to the users who have already received it?

Hi there

I have tried to disable sending last published message when I used to make fresh login by setting “pubsub#send_last_published_item” with a value “never”. It has no effect.

Please help!

Thanks

Lakpa Dindu

Well, the publication is subscription, not user, based. So every time you subscribe you will get the published item. It has nothing to do with your actual login.

To disable, you have to set the send_last_published_item node property to 0 (false), it will default to 1 (true). The value ‘never’ is not a valid boolean argument.

Thanks Rcollier

But still the above mentioned configuration has no effect.

My pubsub node configuration is as follows

deliver_payloads : 1

send_last_published_item: 0

persist_items: 0

access_model: open

How did you change the settings? If you changed it in the db directly the server will have to be restarted.

I have a node with the same setup and it works correctly (v 3.7.1).

What do you mean by db? I am creating and configuring my node using javascript library strophe.js. I couldn’t find how to do it in java smack library?

I have restarted the openfire server but still it has no effect, publishing last message.

Thanks

db=database

Smack api.

Can’t say as to why it is not working for you if you have the property set. I would verify that it was actually set in the database though.

Are you talking about server property set?

Do you use the embedded database, or some form of SQL? If you installed with the default database settings you are using the embedded database, which is much harder to edit than an external database like MySQL. You may want to read http://community.igniterealtime.org/docs/DOC-1540 if you consider migrating.

Jeff

No, I am referring to the pubsub property mentioned earlier.

Hello Jeff

I am using external database mysql.

Hello Rcollier

I can see the pubsub property in my db that send_last_published_item has been set to value “0” but i wonder, still it has no effect.

Thanks

I think the reason is that openfire does not support send_last_published_item property. The property name had been changed from send_item_subscribe to send_last_published_item on version 1.9 (see revision history in XEP-0060 spec.). However, when you look into the latest Openfire source, it has no pieces of code to handle it. Instead, it handles send_item_subscribe, which is the old version of property (see 110 line in LeafNode.java). When you try to configure the node with send_last_published_item property, the node will not be configured correctly.

Good catch!