You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just noticed that using memory for testing meant I had code that is invalid for the kafka driver. Basically, memory allows you to have ints as messages, kafka fails when it tries to message.encode('utf8'). postgres doesn't do a .encode but also fails on an int, as does redis.
Is this expected, in that you are supposed to know what your backend supports so you will naturally think to pass the right kind (which is typed as Any)? Might it be worth having an equivalent API (maybe by default, with specific, alternative pub/sub methods that support the full range of objects supported by the platform)?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I just noticed that using
memory
for testing meant I had code that is invalid for thekafka
driver. Basically,memory
allows you to haveint
s as messages,kafka
fails when it tries tomessage.encode('utf8')
.postgres
doesn't do a.encode
but also fails on an int, as does redis.Is this expected, in that you are supposed to know what your backend supports so you will naturally think to pass the right kind (which is typed as
Any
)? Might it be worth having an equivalent API (maybe by default, with specific, alternative pub/sub methods that support the full range of objects supported by the platform)?Beta Was this translation helpful? Give feedback.
All reactions