GitHub user AnuragReddy2000 added a comment to the discussion: Why is 
deadLetterPolicy attribute in the ConsumerConfigurationData class marked as 
transient?

I see that this change was introduced in [this 
PR](https://github.com/apache/pulsar/pull/9630/files#diff-1b198136fdab1c21a2baea8f2cf7a031dff33c138bd369d191797026880895a5R113)
 which aimed to integrate SpotBugs in the pulsar-client module. Considering 
that the `ConsumerConfigurationData` class extends the `java.io.Serializable` 
interface , SpotBugs would check if all the attributes of that class are 
serializable or not. The attribute `deadLetterPolicy` whose type 
`DeadLetterPolicy` did not extend the aforementioned interface, would surely be 
flagged by SpotBugs and I believe this led to the author of that PR to mark 
this attribute as transient to get around it. 

If some one can confirm this, I can submit a PR with the changes to make the 
`DeadLetterPolicy` class serializable & remove the transient keyword before the 
`deadLetterPolicy` attribute.

GitHub link: 
https://github.com/apache/pulsar/discussions/23076#discussioncomment-10316700

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to