repejota / phpnats

A PHP client for the NATSio cloud messaging system.

Home Page:http://nats.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Protobuf as payload

ipadavic opened this issue · comments

Hi,

I'm trying to use Protocol Buffers as payload. Having golang server and client works fine, but when using same golang server and php client, protobuf is not decoded properly.

Can this lib be used with protobuffs? I see that @byrnedo commented something about protobuf in PR #61 .

Thanks.

Hi,
I'm using https://github.com/drslump/Protobuf-PHP and using it's decode to read the message payloads. Has been working fine for me.

Thanks! Going to take a look ASAP. 👍

Great, I'll try this. I'm using https://github.com/protobuf-php/protobuf and was unable to connect this via phpnats. Will let you know if drslump fixed this.

Heh drslump/Protobuf-PHP generated code is not nearly PSR friendly :(

Sorry for trolling :/. Had some bug on client side. It seems everything works just fine even with https://github.com/protobuf-php/protobuf. So you can probably close this issue.

I must try protobuf-php/protobuf, I gave up before and drslump just ended up working. Yeah, I had to tweak some stuff to get the class loading to work :o