de-couple types from mappers in Stream and Queue
sam-goodwin opened this issue · comments
It's better to avoid specifying mappers
wherever possible. SNS is a good example of this:
punchcard/packages/punchcard/lib/enumerable/topic.ts
Lines 19 to 21 in d866672
as opposed to Queue:
punchcard/packages/punchcard/lib/enumerable/queue.ts
Lines 22 to 24 in d866672
Would rather do something like:
// default to JSON
new Queue(scope, id, {
type: string()
});
// explicitly define codec along-side the type
new Queue(scope, id, {
type: string(),
codec: Codec.Avro
});