On 06/02/16 19:23, David Schenz wrote:
HGETALL ‘zato:pubsub:hash:msg-metadata’
“(None)”
Mhm, that is fine - messages sent from web-admin or services already
expired, right.
OK, I know what this is and here is the full story.
Our URL matcher is here:
https://github.com/zatosource/zato/blob/master/code/zato-server/src/zato/server/connection/http_soap/url_data.py#L45
It is very fast and that is due to the fact that matching is done using
the ‘regex’ library https://pypi.python.org/pypi/regex.
Now, a very popular assumption is the ability to have clean URLs in HTTP
requests, such as:
/order/{order_id}/customer/{cust_id}/
Thanks to SimpleIO https://zato.io/docs/progguide/examples/sio.html this
gets translated to:
class MyService(Service):
class SimpleIO:
input_required = (order_id, cust_id)
def handle(self):
self.logger.info(‘Order ID %s’, self.request.input.order_id)
self.logger.info(‘Cust ID %s’, self.request.input.cust_id)
On top of that, pretty much everyone expects for the ‘/’ character in
URLs to separate segments of data, such as order_id and cust_id above.
In other words, slash is a special characters in URLs and this special
meaning was attached to it because of the expectations regarding clean URLs.
However, this feature was implemented after documentation for pub/sub
was written so the latter still uses ‘/’ as though they were permitted
where in fact they are not allowed anymore.
So my recommendation is to rename your topic to 'vendor.product.create’
which allows for the same kind of namespace separation and documentation
for pub/sub will be amended.
As for why it would work in web-admin - there is no URL pattern matching
there, web-admin uses semi-internal APIs so that is why it never
surfaced in your tests.
thanks a lot,