OK this is a bit of an "in the nettles" question but here goes.

I've been adding bindings using QMF for some time but there's a slightly weird quirk I've just noticed.

To date I've always added binding including a property

        properties.put("exchange-type", exchangeType);

Quite why I ended up doing that I can't quite recall 'cause it was so long ago that I started doing it, but I think that it was likely to be 'cause I looked at Broker::createObject in Broker.cpp and came across the following:

    } else if (type == TYPE_BINDING) {
        BindingIdentifier binding(name);
        std::string exchangeType("topic");
        Variant::Map extensions;
for (Variant::Map::const_iterator i = properties.begin(); i != properties.end(); ++i) { // extract durable, auto-delete and alternate-exchange properties if (i->first == EXCHANGE_TYPE) exchangeType = i->second.asString();
            //treat everything else as extension properties
            else extensions[i->first] = i->second;
        }
        framing::FieldTable arguments;
        qpid::amqp_0_10::translate(extensions, arguments);

bind(binding.queue, binding.exchange, binding.key, arguments, userId, connectionId);

    }

In particular the "if (i->first == EXCHANGE_TYPE)" where EXCHANGE_TYPE is "const std::string EXCHANGE_TYPE("exchange-type");"

So I think I looked at that and noted "exchange-type" had some "significance".

but........

That block of code hasn't changed between 0.12 and 0.20 and I've just noticed that the latest qpid-config doesn't send the "exchange-type" property. I then re-read the block of code and it looks very much like all that is "actually" happening is that the exchange-type property is being skipped, the exchangeType std::string instance being populated in the doesn't actually appear to be used anywhere in that particular block's scope??


would anyone be able to confirm that "exchange-type" has never *actually* needed to be set in a QMF create binding call? I probably ought to take it out of everywhere I do a create binding, but I don't want to accidentally break things for older instances of the broker if it was ever actually needed.

I guess this question is one for the gurus :-)

Cheers,
Frase









---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to