GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing taskiq-python.github.io — Taskiq message format Taskiq message format10/14/23 Taskiq message formatTaskiq doesn't force you to use any specific message format. We define a default message format, but you can use any format you want. The default message format is: example json schema But this can be easily changed by creating your own implementation of the TaskiqFormatter class or TaskiqSerializer class. SerializersSerializers define the format of the message but not the structure. For example, if you want to use msgpack or ORJson to serialize your message, you should update the serializer of your broker. By default, Taskiq uses JSON serializer. But we also have some implementations of other serializers:
To define your own serializer, you have to subclass the TaskiqSerializer class and implement To install taskiq with libraries for non-JSON serializers, you should install taskiq with extras. orjson msgpack cbor After that, you can use your preferred serializer in your project like this: orjson msgpack cbor FormattersFormatters define the format of the message. It might be useful if you'd like to send a task to a celery worker for a different project. You can do it in serializer as well, but formatters give you correct type hints. By default we use a formatter that dumps the message to dict and serializes it using serializer. But you can define your own formatter to send a message in any format you want. To define a new formatter, you have to subclass the TaskiqFormatter class and implement |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |