comtihon / mongodb-erlang

MongoDB driver for Erlang
Apache License 2.0
341 stars 267 forks source link

OP_MSG support? #218

Open peffis opened 4 years ago

peffis commented 4 years ago

Are there any plans (or work done) to support the new (since mongo 3.6) OP_MSG opcode? https://docs.mongodb.com/manual/reference/mongodb-wire-protocol/#op-msg

When connecting to a mongodb that only supports the new format you will currently, with mongodb-erlang, simply get a

#{<<"code">> => 303,
  <<"errmsg">> => <<"Legacy opcodes are not supported">>,
  <<"ok">> => 0.0}

, for any operation that you perform (connecting seems to work though).

This happens for instance if you use this library against DocumentDB in Amazon AWS, which seems to only implement the new API.