AMQP: Use implicits for AMQP serialization
Instead of this:
You could do something like:
Then the serializer class can just go away, and it's easy for users to add support for serializing any type by just putting a ToBinary or FromBinary in scope.
def newRpcClient[O, I](connection: ActorRef,
exchangeName: String,
routingKey: String,
serializer: RpcClientSerializer[O, I]): RpcClient[O,I]
You could do something like:
def newRpcClient[O, I](connection: ActorRef,
exchangeName: String,
routingKey: String)(implicit toBinary: ToBinary[O], fromBinary: FromBinary[I])
Then the serializer class can just go away, and it's easy for users to add support for serializing any type by just putting a ToBinary or FromBinary in scope.
Leave a comment
on 2011-10-07 06:40 *
By viktorklang
Summary changed from Use implicits for AMQP serialization to AMQP: Use implicits for AMQP serialization
AMQP should have a full overhaul.
Updating tickets (#1129, #1132, #1138, #1149, #1153, #1154, #1157, #1161, #1163, #1168, #1170, #1171, #1172, #1176, #1177, #1178, #1180, #1199, #1217, #1218, #1219, #1237, #1238, #1239, #1244, #1246, #1249, #1250, #1251, #1252, #1256, #1301, #1302, #1306, #1395, #1396, #1409, #1418, #455, #891, #895, #912, #956, #972, #1031, #1374, #880, #1125, #1146)