Skip to main content
1-Visitor
June 20, 2018
Solved

Java SDK Thingworx message Size too large

  • June 20, 2018
  • 5 replies
  • 2444 views

Hello everyone,

 

I am trying to update properties of a thing which is binded to a virtual thing in my Java environment. During the updateSubscribedProperties() call I get the following Error:

 

ERROR c.t.c.client.things.VirtualThing - Unable To Update Subscribed Properties For propName : Thingworx message size too large: 55282

 

Note: I am trying to set an ImagePrimitive here. The ImagePrimitive is created with a byte[] array of size 27k which is 27kilobytes in total.

 

I already checked the FileTransferSubsystem and the maxBlocksize is set to 128k so I don't see a problem there. Any Ideas how to resolve this? Should I use a different aproach for setting image properties maybe?

 

Best Regards,

Dominik

Best answer by cbuse

Hi Dominik,

 

A different approach would be to transfer the image from a remote repository on the device in a ThingWorx repository using the Copy service from FileTransferSubsystem, then use service LoadImage from the file repository to get the image, then assign it to a property on the thing.

You would need to extend FileTransferVirtualThing instead of VirtualThing in order to use file transfer. The Java method for adding a remote repository is addVirtualDirectory("AssetRepo",  "E:/AssetRepo").

 

Best regards,

Cristina

5 replies

cbuse13-AquamarineAnswer
13-Aquamarine
June 22, 2018

Hi Dominik,

 

A different approach would be to transfer the image from a remote repository on the device in a ThingWorx repository using the Copy service from FileTransferSubsystem, then use service LoadImage from the file repository to get the image, then assign it to a property on the thing.

You would need to extend FileTransferVirtualThing instead of VirtualThing in order to use file transfer. The Java method for adding a remote repository is addVirtualDirectory("AssetRepo",  "E:/AssetRepo").

 

Best regards,

Cristina

drieder1-VisitorAuthor
1-Visitor
June 25, 2018

Hello Christina,

 

thank you very much for your reply. I will try this out and let you know whether it worked.

 

Best Regards,

Dominik