diff --git a/modules/http/http.c b/modules/http/http.c
index 174efbf37..b8eabf92e 100644
--- a/modules/http/http.c
+++ b/modules/http/http.c
@@ -457,6 +457,8 @@ http_dd_init(LogPipe *s)
           return FALSE;
         }
     }
+  if (self->batch_bytes > 0 && self->super.batch_lines == 0)
+    self->super.batch_lines = G_MAXINT;
 
   log_template_options_init(&self->template_options, cfg);