[PDB-2441] Commands should be submitted only as bytes Created: 2016/02/17  Updated: 2016/04/20  Resolved: 2016/02/24

Status: Closed
Project: PuppetDB
Component/s: None
Affects Version/s: None
Fix Version/s: PDB 4.0.0

Type: Bug Priority: Normal
Reporter: Ryan Senior Assignee: Rob Browning
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: MQ Improvements
Story Points: 2
Sprint: PuppetDB 2016-02-24


Our code currently has a protocol that submits messages using TextMessages (if a string) and bytes message if it's a byte array. We should switch that to only submit byte messages. If given a string, we should just convert it to bytes.

We should confirm this, but we've seen in heap dumps that the original bytes of the TextMessage remain in memory for the duration of the consumer thread's processing, in addition to the string copy. These bytes can be parsed directly and we can avoid having 2 copies in memory before being parsed.

Generated at Mon Sep 23 12:58:40 PDT 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.