[Question] How to specify MessagePack settings using the management API
See original GitHub issueWhen using the management API - like
var serviceManager = new ServiceManagerBuilder().WithOptions(o =>
{
o.ConnectionString = signalRConfiguration.ConnectionString;
})
.Build();
how can I tell it which MessagePack settings to use?
I understand that it automatically activates the MessagePack protocol, but I require specific configuration for MessagePack, how can I do that?
Thanks, MR
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
How configure MessagePackSerializer.DefaultOptions? #529
All libraries that consume MessagePack would have to always explicitly specify the options in order to defend against apps that changed the ...
Read more >MessagePack: It's like JSON. but fast and small.
It's like JSON. but fast and small. MessagePack is an efficient binary serialization format. It lets you exchange data among multiple languages like...
Read more >msgpack response if client asks for application/x- ...
This enhancement request is for fastapi to respond in msgpack if the requesting client ask for the mimetype application/x-msgpack .
Read more >c++ - What and When needs to be cleaned up when using ...
When you use msgpack::unpack() function, the default unpacking behavior is copy. So you can destroy msgdata after msgpack::unpack() is called.
Read more >Msgpack support
Msgpack is an efficient serialization protocol that behaves similarly to JSON. It provides faster and more robust serialization for agent-server communications, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
In default config, the management sdk calls rest api, which will serialize to json, but it will not impact the billing since it is inboind message. But it can be slower. Suggest to use Persistent mode in WithOptions(…), it will create a websocket to signalr service to.communicate later, and use messagepack protocol inside, it is faster than the default one (transient mode) https://github.com/Azure/azure-signalr/blob/dev/docs/management-sdk-guide.md#transport-type
Thanks, Wanpeng Li
From: Wanpeng Li @.> Sent: Thursday, May 27, 2021 7:27:53 PM To: Azure/azure-signalr @.>; Azure/azure-signalr @.> Cc: Mention @.> Subject: Re: [Azure/azure-signalr] [Question] How to specify MessagePack settings using the management API (#1284)
Signalr service will only count outbound message (message that is go out of signalr service) for the protocol of client. So you can add message pack protocol to your client to avoid increasing billing (serialized to JSON for your client).
From: ModernRonin @.> Sent: Thursday, May 27, 2021 6:42:13 PM To: Azure/azure-signalr @.> Cc: Wanpeng Li @.>; Mention @.> Subject: Re: [Azure/azure-signalr] [Question] How to specify MessagePack settings using the management API (#1284)
alternatively, if, without doing any special configuration, with the default setup, I send a byte[], will this be sent over the wire in binary format (so the serialized size equals the length of the array) or will it be serialized to JSON (so the size would be many times the length of the array)?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAzure%2Fazure-signalr%2Fissues%2F1284%23issuecomment-849529132&data=04|01|Wanpeng.Li%40microsoft.com|2ce7d1f881b648686c3908d920fc1705|72f988bf86f141af91ab2d7cd011db47|1|0|637577089370606699|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=ktIQnrTs6RHVRz0%2FsCGUmuJ4SEetvxbnmrYsUdQqUbY%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAJDW7OMWYFBRXLTQ5BUAVDDTPYOYLANCNFSM45P7O2ZQ&data=04|01|Wanpeng.Li%40microsoft.com|2ce7d1f881b648686c3908d920fc1705|72f988bf86f141af91ab2d7cd011db47|1|0|637577089370606699|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=b7smPVsoJ4JZaUYu8DV7FbuAyXD0znt%2F8zLg0ggIews%3D&reserved=0.
Now MessagePack is also supported in the persistent mode and you could customize the MessagePack serialization options. Please note that this might break things if you also have SignalR Functions trigger to receive your client invocations because SignalR trigger uses default MessagePack serialization options. You could update your SDK to the latest version and follow the guide here .