Class PublisherImpl (1.15.18) 
  
      
     
  
  
  
   
  
    
  
  
    
    
    
  Version latestkeyboard_arrow_down  
  
 
    
    
    
    
      
  
  
  
    
public   final   class  PublisherImpl   extends   ProxyService   implements   SequencedPublisher<Offset> ,   RetryingConnectionObserver<MessagePublishResponse>  
   
  
  
    
Implements 
    com.google.cloud.pubsublite.internal.SequencedPublisher<com.google.cloud.pubsublite.Offset> , 
    com.google.cloud.pubsublite.internal.wire.RetryingConnectionObserver<com.google.cloud.pubsublite.proto.MessagePublishResponse>  
  
  
  Constructors
   
   
  PublisherImpl(StreamFactories.PublishStreamFactory streamFactory, InitialPublishRequest initialRequest, BatchingSettings batchingSettings) 
  
    
public   PublisherImpl ( StreamFactories . PublishStreamFactory   streamFactory ,   InitialPublishRequest   initialRequest ,   BatchingSettings   batchingSettings )  
   
  
  Methods
   
   
  cancelOutstandingPublishes() 
  
    
public   void   cancelOutstandingPublishes ()  
   
  Attempts to cancel all outstanding publishes.
 
   
  flush() 
  
   
  handlePermanentError(CheckedApiException error) 
  
    
protected   void   handlePermanentError ( CheckedApiException   error )  
   
  
  Overrides 
  
   
  onClientResponse(MessagePublishResponse publishResponse) 
  
    
public   void   onClientResponse ( MessagePublishResponse   publishResponse )  
   
  
  
   
  publish(PubSubMessage message, PublishSequenceNumber sequenceNumber) 
  
    
public   ApiFuture<Offset>   publish ( PubSubMessage   message ,   PublishSequenceNumber   sequenceNumber )  
   
  Publish a new message with an assigned sequence number.
 
Behavior is undefined if a call to flush() is outstanding or close() has already been
 called. This method never blocks.
 
Guarantees that if a single publish future has an exception set, all publish calls made
 after that will also have an exception set.
 
  
  
   
  start() 
  
  Overrides 
  
   
  stop() 
  
  Overrides 
  
   
  triggerReinitialize(CheckedApiException streamError) 
  
    
public   void   triggerReinitialize ( CheckedApiException   streamError )  
   
  
 
     
    
  
  
  
     
  
 
  
    
    
      
       
    
    
  
  
 
  Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
  Last updated 2025-10-30 UTC.
 
 
  
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-30 UTC."],[],[]]